import { Property, BlogPost, FAQItem } from "./types";

export interface AdminInquiry {
  id: string;
  name: string;
  email: string;
  phone: string;
  message: string;
  propertyId?: string;
  propertyTitle?: string;
  type: "property" | "general" | "evaluation";
  status: "new" | "contacted" | "closed";
  createdAt: string;
}

export interface AdminPage {
  id: string;
  title: string;
  slug: string;
  status: "published" | "draft";
  updatedAt: string;
}

export interface CustomFieldDefinition {
  id: string;
  label: string;
  labelEn?: string;
  fieldKey: string;
  fieldType: "text" | "number" | "textarea" | "dropdown" | "multi-select" | "checkbox" | "radio" | "boolean" | "date" | "media";
  section: string;
  propertyTypes: string[];
  options?: string[];
  required: boolean;
  showInFilter: boolean;
  showInDetail: boolean;
  defaultValue?: string;
  helperText?: string;
  order: number;
}

export interface AdminStats {
  totalProperties: number;
  activeProperties: number;
  totalInquiries: number;
  newInquiries: number;
  totalBlogPosts: number;
  totalPageViews: number;
}

export const adminStats: AdminStats = {
  totalProperties: 24,
  activeProperties: 18,
  totalInquiries: 47,
  newInquiries: 12,
  totalBlogPosts: 8,
  totalPageViews: 15420,
};

export const mockInquiries: AdminInquiry[] = [
  { id: "inq-1", name: "Мария Иванова", email: "maria@example.com", phone: "+359888123456", message: "Интересувам се от апартамента в Солун.", propertyId: "1", propertyTitle: "Луксозен апартамент в Солун", type: "property", status: "new", createdAt: "2024-03-15" },
  { id: "inq-2", name: "Георги Петров", email: "georgi@example.com", phone: "+359899654321", message: "Бих искал оценка на имот в Атина.", type: "evaluation", status: "contacted", createdAt: "2024-03-14" },
  { id: "inq-3", name: "Елена Димитрова", email: "elena@example.com", phone: "+359877111222", message: "Търся вила на остров Крит.", type: "general", status: "new", createdAt: "2024-03-13" },
  { id: "inq-4", name: "Николай Стоянов", email: "nik@example.com", phone: "+359866333444", message: "Имам въпрос относно процеса на покупка.", type: "general", status: "closed", createdAt: "2024-03-10" },
  { id: "inq-5", name: "Анна Колева", email: "anna@example.com", phone: "+359855555666", message: "Искам информация за наеми в Халкидики.", type: "property", status: "new", createdAt: "2024-03-12" },
];

export const mockPages: AdminPage[] = [
  { id: "page-1", title: "За нас", slug: "about", status: "published", updatedAt: "2024-03-10" },
  { id: "page-2", title: "Условия за ползване", slug: "terms", status: "published", updatedAt: "2024-02-15" },
  { id: "page-3", title: "Политика за поверителност", slug: "privacy", status: "published", updatedAt: "2024-02-15" },
  { id: "page-4", title: "Процес на покупка", slug: "buying-process", status: "draft", updatedAt: "2024-03-01" },
];

export const propertyTypes = ["Апартамент", "Къща", "Вила", "Търговски обект", "Парцел", "Студио", "Мезонет"];
export const dealTypes = ["Продажба", "Наем"];
export const propertyStatuses = [
  { value: "active", label: "Активен", color: "bg-green-100 text-green-800" },
  { value: "sold", label: "Продаден", color: "bg-red-100 text-red-800" },
  { value: "reserved", label: "Резервиран", color: "bg-yellow-100 text-yellow-800" },
  { value: "rented", label: "Отдаден", color: "bg-blue-100 text-blue-800" },
  { value: "hidden", label: "Скрит", color: "bg-gray-100 text-gray-800" },
  { value: "draft", label: "Чернова", color: "bg-purple-100 text-purple-800" },
];

export const fieldSections = ["Основни", "Локация", "Характеристики", "Удобства", "Правен статус", "Енергийна ефективност"];

export const mockCustomFields: CustomFieldDefinition[] = [
  { id: "cf-1", label: "Етаж", fieldKey: "floor", fieldType: "number", section: "Основни", propertyTypes: ["Апартамент", "Студио", "Мезонет"], required: false, showInFilter: true, showInDetail: true, order: 1 },
  { id: "cf-2", label: "Общо етажи", fieldKey: "totalFloors", fieldType: "number", section: "Основни", propertyTypes: ["Апартамент", "Студио", "Мезонет"], required: false, showInFilter: false, showInDetail: true, order: 2 },
  { id: "cf-3", label: "Тип отопление", fieldKey: "heatingType", fieldType: "dropdown", section: "Характеристики", propertyTypes: ["Апартамент", "Къща", "Вила"], options: ["Централно", "Автономно", "Газ", "Ток", "Камина"], required: false, showInFilter: true, showInDetail: true, order: 3 },
  { id: "cf-4", label: "Площ на парцел", fieldKey: "plotSize", fieldType: "number", section: "Основни", propertyTypes: ["Къща", "Вила", "Парцел"], required: false, showInFilter: true, showInDetail: true, helperText: "В квадратни метри", order: 4 },
  { id: "cf-5", label: "Басейн", fieldKey: "pool", fieldType: "checkbox", section: "Удобства", propertyTypes: ["Къща", "Вила"], required: false, showInFilter: true, showInDetail: true, order: 5 },
  { id: "cf-6", label: "Разрешение за ползване", fieldKey: "usagePermit", fieldType: "radio", section: "Правен статус", propertyTypes: ["Търговски обект"], options: ["Да", "Не", "В процес"], required: true, showInFilter: false, showInDetail: true, order: 6 },
  { id: "cf-7", label: "Строителна възможност", fieldKey: "buildability", fieldType: "dropdown", section: "Характеристики", propertyTypes: ["Парцел"], options: ["Жилищно", "Търговско", "Смесено", "Земеделско"], required: false, showInFilter: true, showInDetail: true, order: 7 },
  { id: "cf-8", label: "Гледка към морето", fieldKey: "seaView", fieldType: "checkbox", section: "Удобства", propertyTypes: ["Апартамент", "Къща", "Вила", "Студио", "Мезонет"], required: false, showInFilter: true, showInDetail: true, order: 8 },
];

export const userRoles = [
  { value: "admin", label: "Администратор", description: "Пълен достъп до всички функции" },
  { value: "editor", label: "Редактор", description: "Управление на съдържание без системни настройки" },
  { value: "broker", label: "Брокер", description: "Управление само на собствени обяви и заявки" },
];
