export interface AppSettings {
  businessName: string;
  logoUrl: string | null;
  contactPhone: string;
  contactEmail: string;
  address: string;
  currency: string;
  language: "en" | "fr" | "ar";
  timezone: string;
  checkInTime: string;
  checkOutTime: string;
  weekendDays: number[]; // 0=Sun … 6=Sat
  weekendMarkupPercent: number;
  maxDiscountPercentWorker: number;
  commissionAmount: number;
  commissionTrigger: "RESERVATION_CONFIRMED" | "CHECK_IN";
  commissionOnCancel: "CANCEL" | "KEEP";
  contractTerms: string;
  passwordMinLength: number;
  sessionDays: number;
  sessionDaysRemember: number;
  autoCreateCleaningTask: boolean;
  cancelReleasePolicy: "IMMEDIATE" | "APPROVAL" | "KEEP";
  earlyCheckoutReleasePolicy: "IMMEDIATE" | "AFTER_CLEANING" | "KEEP";
  theme: "system" | "light" | "dark";
  accent: "teal" | "indigo" | "amber";
  // Website, ads & Google reviews
  /** WhatsApp number guests write to (falls back to contactPhone) */
  whatsappNumber: string;
  /** honest typical reply time shown to visitors, in minutes */
  replyMinutes: number;
  /** Google Business Profile place ID (ChIJ…) — enables the live rating & reviews block */
  googlePlaceId: string;
  /** "Write a review" short link from Google Business Profile (g.page/r/…/review) */
  googleReviewUrl: string;
  /** Google Maps listing link */
  googleMapsUrl: string;
  /** Meta (Facebook) Pixel ID for ad campaigns; empty disables tracking */
  fbPixelId: string;
  /** WhatsApp text staff send after a stay. Placeholders: {{name}}, {{business}}, {{link}} */
  reviewAskMessage: string;
}

export const DEFAULT_SETTINGS: AppSettings = {
  businessName: "LocaJour",
  logoUrl: null,
  contactPhone: "+212 6 61 00 00 00",
  contactEmail: "contact@locajour.ma",
  address: "12 Boulevard Anfa, Casablanca, Morocco",
  currency: "MAD",
  language: "en",
  timezone: "Africa/Casablanca",
  checkInTime: "14:00",
  checkOutTime: "11:00",
  weekendDays: [5, 6],
  weekendMarkupPercent: 15,
  maxDiscountPercentWorker: 10,
  commissionAmount: 50,
  commissionTrigger: "RESERVATION_CONFIRMED",
  commissionOnCancel: "CANCEL",
  contractTerms: `1. The tenant agrees to occupy the apartment solely as a short-term furnished rental for the duration stated in this contract.
2. Check-in is from {{checkInTime}} and check-out is before {{checkOutTime}}. Late check-out must be agreed in advance and may be charged.
3. A refundable security deposit of {{deposit}} is collected at check-in and returned at check-out after inspection, less any damages.
4. The number of occupants may not exceed the maximum stated. Visitors are not permitted to stay overnight without prior approval.
5. Smoking, parties and pets are not allowed inside the apartment unless explicitly stated.
6. The tenant is responsible for any damage to the property or its contents during the stay and must report incidents immediately.
7. The owner may enter the apartment for urgent maintenance with reasonable notice.
8. Cancellations and refunds follow the policy agreed at reservation time.
9. This contract is governed by Moroccan law. A copy of the tenant's identification is kept on file in accordance with lodging regulations.`,
  passwordMinLength: 8,
  sessionDays: 1,
  sessionDaysRemember: 30,
  autoCreateCleaningTask: true,
  cancelReleasePolicy: "IMMEDIATE",
  earlyCheckoutReleasePolicy: "AFTER_CLEANING",
  whatsappNumber: "",
  replyMinutes: 10,
  googlePlaceId: "",
  googleReviewUrl: "",
  googleMapsUrl: "",
  fbPixelId: "",
  reviewAskMessage: "Hello {{name}}, thank you for staying with {{business}}! If you have a minute, we would love to hear how your stay went. Your honest review helps other travellers: {{link}}",
  theme: "system",
  accent: "teal",
};
