using Model;
using System.Collections.Generic;
namespace Web.ViewModel.CmsVM
{
///
/// Main ViewModel for the unified CMS Dashboard.
/// Holds all entity lists for tabs + counts for overview.
///
public class CmsDashboardViewModel
{
// ── Entity Lists (for tab content) ──
public List Pages { get; set; } = new();
public List Banners { get; set; } = new();
public List Footers { get; set; } = new();
public List SocialMedias { get; set; } = new();
public List Addresses { get; set; } = new();
// ── Counts (for overview stats) ──
public int PageCount => Pages.Count;
public int BannerCount => Banners.Count;
public int FooterCount => Footers.Count;
public int SocialMediaCount => SocialMedias.Count;
public int AddressCount => Addresses.Count;
public int TotalItems => PageCount + BannerCount + FooterCount + SocialMediaCount + AddressCount;
// ── Quick Lookups (for dropdowns in Page create/edit modal) ──
///
/// Used in Page create/edit modal — dropdown to select a Banner
///
public List BannerOptions { get; set; } = new();
///
/// Used in Page create/edit modal — dropdown to select a Footer
///
public List FooterOptions { get; set; } = new();
///
/// Used in Footer edit modal — checkboxes to assign Social Media links
///
public List SocialMediaOptions { get; set; } = new();
}
///
/// Lightweight item for Banner dropdown in Page form
///
public class BannerSelectItem
{
public int Id { get; set; }
public string Title { get; set; } = string.Empty;
}
///
/// Lightweight item for Footer dropdown in Page form
///
public class FooterSelectItem
{
public int Id { get; set; }
public string Name { get; set; } = string.Empty;
}
///
/// Lightweight item for Social Media checkboxes in Footer form
///
public class SocialMediaSelectItem
{
public int Id { get; set; }
public string Name { get; set; } = string.Empty;
public string Url { get; set; } = string.Empty;
}
}