export type AdType = 'system' | 'payment_subscribe' | 'payment_donate' | 'payment_shop' | 'custom';

export type AdVariant = 'standard' | 'highlight' | 'minimal';

export type AdCtaStyle = 'primary' | 'outline' | 'link';

export type AdVisibility = 'everyone' | 'anonymous' | 'authenticated' | 'non_subscriber';

export type AdPlacement =
  | 'gallery'
  | 'campaigns_list'
  | 'campaign_detail'
  | 'shifts'
  | 'shop'
  | 'donate'
  | 'pricing'
  | 'landing_page'
  | 'docs';

export interface GalleryAd {
  id: number;
  type: AdType;
  variant: AdVariant;
  title: string;
  subtitle: string | null;
  imagePath: string | null;
  linkUrl: string | null;
  ctaText: string | null;
  ctaStyle: AdCtaStyle;
  bgColor: string | null;
  iconEmoji: string | null;
  visibility: AdVisibility;
  isActive: boolean;
  position: number;
  frequency: number;
  isSystemAd: boolean;
  placements: AdPlacement[];
  productId: string | null;
  impressionCount: number;
  clickCount: number;
  startDate: string | null;
  endDate: string | null;
  createdAt: string;
  updatedAt: string | null;
}

export const AD_TYPE_LABELS: Record<AdType, string> = {
  system: 'System',
  payment_subscribe: 'Subscribe',
  payment_donate: 'Donate',
  payment_shop: 'Shop',
  custom: 'Custom',
};

export const AD_TYPE_COLORS: Record<AdType, string> = {
  system: 'blue',
  payment_subscribe: 'purple',
  payment_donate: 'green',
  payment_shop: 'orange',
  custom: 'default',
};

export const AD_VISIBILITY_LABELS: Record<AdVisibility, string> = {
  everyone: 'Everyone',
  anonymous: 'Anonymous Only',
  authenticated: 'Logged-In Only',
  non_subscriber: 'Non-Subscribers',
};

export const AD_VISIBILITY_COLORS: Record<AdVisibility, string> = {
  everyone: 'blue',
  anonymous: 'green',
  authenticated: 'purple',
  non_subscriber: 'orange',
};

export const AD_PLACEMENT_LABELS: Record<AdPlacement, string> = {
  gallery: 'Gallery',
  campaigns_list: 'Campaigns List',
  campaign_detail: 'Campaign Detail',
  shifts: 'Shifts',
  shop: 'Shop',
  donate: 'Donate',
  pricing: 'Pricing',
  landing_page: 'Landing Pages',
  docs: 'Documentation',
};
