using ErsatzTV.Core.Api.ChannelTemplates;
using ErsatzTV.Core.Domain;

namespace ErsatzTV.Application.ChannelTemplates;

public static class ChannelTemplateMapper
{
    public static ChannelTemplateResponseModel ProjectToResponseModel(ChannelTemplate template, int? defaultTemplateId) =>
        new(
            template.Id,
            template.Name,
            template.Description,
            template.IsSystem,
            defaultTemplateId == template.Id,
            template.FFmpegProfileId,
            template.WatermarkId,
            template.FallbackFillerId,
            template.PreRollFillerId,
            template.MidRollFillerId,
            template.PostRollFillerId,
            template.StreamSelectorMode,
            template.StreamSelector,
            template.PreferredAudioLanguageCode,
            template.PreferredAudioTitle,
            template.PlayoutSource,
            template.PlayoutMode,
            template.StreamingMode,
            template.PreferredSubtitleLanguageCode,
            template.SubtitleMode,
            template.MusicVideoCreditsMode,
            template.MusicVideoCreditsTemplate,
            template.SongVideoMode,
            template.TranscodeMode,
            template.IdleBehavior,
            template.ShuffleScheduleItems,
            template.RandomStartPoint,
            template.FixedStartTimeBehavior);
}
