using AutoMapper;
using Qusion.Cms.Media.Video;

namespace Qusion.WebApp.Areas.Qusion.Models.Videos
{
    public class VideoProfile : Profile
    {
        protected override void Configure()
        {
            Mapper.CreateMap<VideoItem, VideoListModel>();

            Mapper.CreateMap<VideoItem, VideoModel>();

            Mapper.CreateMap<VideoEditModel, VideoItem>()
                .ForMember(x => x.Labels, o => o.Ignore());

            Mapper.CreateMap<VideoSettingsInput, VideoSettings>();
            Mapper.CreateMap<VideoSettings, VideoSettingsModel>();

            Mapper.CreateMap<VideoCreateModel, VideoItem>();

            Mapper.CreateMap<VideoQueryInput, VideoQuery>()
                .ConstructUsing(x => VideoQuery.Default);
        }
    }
}