import type { Timestamp } from "firebase/firestore";

export type FireTimestamp = Timestamp;

export interface HeroContent {
  badge: string;
  lawyerName: string;
  slogan: string;
  shortDescription: string;
  ctaLabel: string;
  heroImageUrl: string;
}

export interface StatItem {
  id: string;
  label: string;
  value: string;
}

export interface Testimonial {
  id: string;
  name: string;
  role: string;
  quote: string;
  imageUrl?: string;
  /** 1–5, gösterim için; yoksa 5 kabul edilir */
  rating?: number;
}

export type TestimonialSubmissionStatus = "pending" | "approved" | "rejected";

/** Müvekkil yorumu başvurusu; onay sonrası ana sayfada gösterilir */
export interface TestimonialSubmission {
  id: string;
  name: string;
  role: string;
  quote: string;
  rating?: number;
  imageUrl?: string;
  status: TestimonialSubmissionStatus;
  /** Onay sonrası sıralama (küçükten büyüğe); bekleyen kayıtta yoktur */
  order?: number;
  createdAt?: FireTimestamp;
  approvedAt?: FireTimestamp;
}

export interface HomeContent {
  shortBio: string;
  experienceHighlight: string;
  /** Ana sayfa vizyon bölümündeki çerçeveli görsel */
  visionImageUrl: string;
  visionTitle: string;
  visionBody: string;
  visionQuote: string;
  finalCtaTitle: string;
  stats: StatItem[];
  /** @deprecated Yorumlar testimonialSubmissions koleksiyonundan gelir; eski veri için boş bırakılabilir */
  testimonials?: Testimonial[];
}

export interface SocialLink {
  id: string;
  platform: string;
  url: string;
}

/** Site genelinde `globals.css` ile aynı isimli CSS değişkenlerine yazılır */
export interface SiteThemeColors {
  navy: string;
  navySoft: string;
  gold: string;
  goldDark: string;
  page: string;
  muted: string;
  /** Kenarlık / ayırıcı; hex veya `rgba(...)` */
  line: string;
}

export interface SiteSettings {
  siteTitle: string;
  logoUrl: string;
  phone: string;
  email: string;
  address: string;
  mapEmbedUrl: string;
  whatsappNumber: string;
  social: SocialLink[];
  /** Üye kayıt sayfası (/kayit) açık mı */
  allowPublicRegistration: boolean;
  /** Son seçilen hazır palet kimliği; elle renk değişince `ozel` olur */
  colorPaletteId: string;
  /** Aktif site renkleri */
  themeColors: SiteThemeColors;
}

/** Site üzerinden kayıt olan kullanıcılar (yönetici değil) */
export interface RegisteredUser {
  id: string;
  email: string;
  displayName: string;
  status: "active" | "banned";
  createdAt?: FireTimestamp;
}

export interface EducationItem {
  id: string;
  year: string;
  title: string;
  institution: string;
  description?: string;
}

export interface ExperienceItem {
  id: string;
  year: string;
  title: string;
  organization: string;
  description?: string;
}

export interface CertificateItem {
  id: string;
  name: string;
  issuer: string;
  year?: string;
}

export interface AboutProfile {
  photoUrl: string;
  biography: string;
  education: EducationItem[];
  experience: ExperienceItem[];
  certificates: CertificateItem[];
}

export interface ExpertiseArea {
  id: string;
  title: string;
  description: string;
  iconKey: string;
  imageUrl: string;
  order: number;
  createdAt?: FireTimestamp;
}

export interface TeamMember {
  id: string;
  name: string;
  role: string;
  bio: string;
  imageUrl: string;
  email?: string;
  phone?: string;
  order: number;
  createdAt?: FireTimestamp;
}

export interface BlogPost {
  id: string;
  title: string;
  slug: string;
  excerpt: string;
  content: string;
  coverImageUrl: string;
  published: boolean;
  createdAt?: FireTimestamp;
  updatedAt?: FireTimestamp;
}

export interface ContactMessage {
  id: string;
  name: string;
  email: string;
  phone?: string;
  subject?: string;
  message: string;
  read: boolean;
  createdAt?: FireTimestamp;
}
