using DomainObjects.PageSections;
using WeatherForecast.Models.Abstractions;
using WeatherForecast.Models.Abstractions.PostItem.Responses;
namespace WeatherForecast.Models.Content.Responses.PageSections {
  /// 
  /// 
  /// 
  public class TitleSectionModel : PageSectionModelBase {
    /// 
    /// 
    /// 
    public MediaAttachmentResponseModel? Image { get; set; }
    /// 
    /// 
    /// 
    public LinkModel? PrimaryLink { get; set; }
    /// 
    /// 
    /// 
    public LinkModel? SecondaryLink { get; set; }
    /// 
    /// 
    /// 
    public string? PostedOnBy { get; set; }
    /// 
    /// 
    /// 
    public TitleSectionModel() { }
    /// 
    /// 
    /// 
    /// 
    public TitleSectionModel(TitleSection titleSection) : base(titleSection) {
      //if(titleSection.Image != null)
      //  Image = new ImageModel(titleSection.Image);
      if (titleSection.PrimaryLink != null)
        PrimaryLink = new LinkModel(titleSection.PrimaryLink);
      if (titleSection.SecondaryLink != null)
        PrimaryLink = new LinkModel(titleSection.SecondaryLink);
      if (titleSection.PostedOnBy != null)
        PostedOnBy = titleSection.PostedOnBy;
    }
  }
}