namespace ladaexpress.vn.Infrastructures.DTO.Models.Seo
{
    /// <summary>
    /// Model cho Organization schema
    /// </summary>
    public class OrganizationSchema
    {
        public string Type { get; set; } = "Organization";
        public string Name { get; set; } = string.Empty;
        public string Url { get; set; } = string.Empty;
        public string Logo { get; set; } = string.Empty;
        public string Description { get; set; } = string.Empty;
        public ContactPointSchema ContactPoint { get; set; } = new ContactPointSchema();
        public List<string> SameAs { get; set; } = new List<string>();
        public AddressSchema Address { get; set; } = new AddressSchema();
    }

    /// <summary>
    /// Model cho Website schema
    /// </summary>
    public class WebsiteSchema
    {
        public string Type { get; set; } = "WebSite";
        public string Name { get; set; } = string.Empty;
        public string Url { get; set; } = string.Empty;
        public SearchActionSchema? PotentialAction { get; set; }
    }

    /// <summary>
    /// Model cho Article schema
    /// </summary>
    public class ArticleSchema
    {
        public string Type { get; set; } = "Article";
        public string Headline { get; set; } = string.Empty;
        public string Description { get; set; } = string.Empty;
        public string Image { get; set; } = string.Empty;
        public string Url { get; set; } = string.Empty;
        public DateTime DatePublished { get; set; }
        public DateTime DateModified { get; set; }
        public PersonSchema Author { get; set; } = new PersonSchema();
        public OrganizationSchema Publisher { get; set; } = new OrganizationSchema();
        public string MainEntityOfPage { get; set; } = string.Empty;
        public List<string> Keywords { get; set; } = new List<string>();
    }

    /// <summary>
    /// Model cho Product/Service schema
    /// </summary>
    public class ProductSchema
    {
        public string Type { get; set; } = "Product";
        public string Name { get; set; } = string.Empty;
        public string Description { get; set; } = string.Empty;
        public string Image { get; set; } = string.Empty;
        public string Url { get; set; } = string.Empty;
        public string Brand { get; set; } = string.Empty;
        public OfferSchema? Offers { get; set; }
        public AggregateRatingSchema? AggregateRating { get; set; }
    }

    /// <summary>
    /// Model cho BreadcrumbList schema
    /// </summary>
    public class BreadcrumbListSchema
    {
        public string Type { get; set; } = "BreadcrumbList";
        public List<ListItemSchema> ItemListElement { get; set; } = new List<ListItemSchema>();
    }

    /// <summary>
    /// Model cho FAQ schema
    /// </summary>
    public class FAQPageSchema
    {
        public string Type { get; set; } = "FAQPage";
        public List<QuestionSchema> MainEntity { get; set; } = new List<QuestionSchema>();
    }

    /// <summary>
    /// Supporting schemas
    /// </summary>
    public class ContactPointSchema
    {
        public string Type { get; set; } = "ContactPoint";
        public string Telephone { get; set; } = string.Empty;
        public string ContactType { get; set; } = "customer service";
        public string Email { get; set; } = string.Empty;
    }

    public class AddressSchema
    {
        public string Type { get; set; } = "PostalAddress";
        public string StreetAddress { get; set; } = string.Empty;
        public string AddressLocality { get; set; } = string.Empty;
        public string AddressRegion { get; set; } = string.Empty;
        public string PostalCode { get; set; } = string.Empty;
        public string AddressCountry { get; set; } = "VN";
    }

    public class SearchActionSchema
    {
        public string Type { get; set; } = "SearchAction";
        public string Target { get; set; } = string.Empty;
        public string QueryInput { get; set; } = "required name=search_term_string";
    }

    public class PersonSchema
    {
        public string Type { get; set; } = "Person";
        public string Name { get; set; } = string.Empty;
        public string Url { get; set; } = string.Empty;
    }

    public class OfferSchema
    {
        public string Type { get; set; } = "Offer";
        public string PriceCurrency { get; set; } = "VND";
        public decimal Price { get; set; }
        public string Availability { get; set; } = "https://schema.org/InStock";
        public string Url { get; set; } = string.Empty;
    }

    public class AggregateRatingSchema
    {
        public string Type { get; set; } = "AggregateRating";
        public decimal RatingValue { get; set; }
        public decimal BestRating { get; set; } = 5;
        public decimal WorstRating { get; set; } = 1;
        public int RatingCount { get; set; }
    }

    public class ListItemSchema
    {
        public string Type { get; set; } = "ListItem";
        public int Position { get; set; }
        public string Name { get; set; } = string.Empty;
        public string Item { get; set; } = string.Empty;
    }

    public class QuestionSchema
    {
        public string Type { get; set; } = "Question";
        public string Name { get; set; } = string.Empty;
        public AnswerSchema AcceptedAnswer { get; set; } = new AnswerSchema();
    }

    public class AnswerSchema
    {
        public string Type { get; set; } = "Answer";
        public string Text { get; set; } = string.Empty;
    }

    /// <summary>
    /// Model cho CollectionPage schema (danh mục)
    /// </summary>
    public class CollectionPageSchema
    {
        public string Type { get; set; } = "CollectionPage";
        public string Name { get; set; } = string.Empty;
        public string Description { get; set; } = string.Empty;
        public string Url { get; set; } = string.Empty;
        public int? NumberOfItems { get; set; }
        public List<string> About { get; set; } = new List<string>();
    }

    /// <summary>
    /// Simple FAQ Item model
    /// </summary>
    public class FAQItem
    {
        public string Question { get; set; } = string.Empty;
        public string Answer { get; set; } = string.Empty;
    }
}