// Legal configuration for Impressum and Datenschutz
export interface LegalConfig {
  // Impressum data
  companyName: string;
  ownerName: string;
  address: {
    street: string;
    city: string;
    postalCode: string;
    country: string;
  };
  contact: {
    phone: string;
    email: string;
    website: string;
  };
  businessDetails: {
    taxId?: string;
    vatId?: string;
    commercialRegister?: string;
    responsibleForContent: string;
  };
  
  // Datenschutz data
  dataProtection: {
    responsiblePerson: string;
    email: string;
    purpose: string;
    legalBasis: string;
    dataRetention: string;
    rights: string;
    cookies: string;
    thirdPartyServices: string[];
    dataSecurity: string;
    contactDataProtection: string;
  };
}

// Default configuration - should be overridden by environment variables
export const defaultLegalConfig: LegalConfig = {
  companyName: process.env.COMPANY_NAME || "Stargirlnails Kiel",
  ownerName: process.env.OWNER_NAME || "Inhaber Name",
  address: {
    street: process.env.ADDRESS_STREET || "Musterstraße 123",
    city: process.env.ADDRESS_CITY || "Kiel",
    postalCode: process.env.ADDRESS_POSTAL_CODE || "24103",
    country: process.env.ADDRESS_COUNTRY || "Deutschland",
  },
  contact: {
    phone: process.env.CONTACT_PHONE || "+49 431 123456",
    email: process.env.CONTACT_EMAIL || "info@stargirlnails.de",
    website: process.env.DOMAIN || "stargirlnails.de",
  },
  businessDetails: {
    taxId: process.env.TAX_ID || "",
    vatId: process.env.VAT_ID || "",
    commercialRegister: process.env.COMMERCIAL_REGISTER || "",
    responsibleForContent: process.env.RESPONSIBLE_FOR_CONTENT || "Inhaber Name",
  },
  dataProtection: {
    responsiblePerson: process.env.DATA_PROTECTION_RESPONSIBLE || "Inhaber Name",
    email: process.env.DATA_PROTECTION_EMAIL || "datenschutz@stargirlnails.de",
    purpose: process.env.DATA_PROTECTION_PURPOSE || "Terminbuchung und Kundenbetreuung",
    legalBasis: process.env.DATA_PROTECTION_LEGAL_BASIS || "Art. 6 Abs. 1 lit. b DSGVO (Vertragserfüllung) und Art. 6 Abs. 1 lit. f DSGVO (berechtigtes Interesse)",
    dataRetention: process.env.DATA_PROTECTION_RETENTION || "Buchungsdaten werden 3 Jahre nach Vertragsende gespeichert",
    rights: process.env.DATA_PROTECTION_RIGHTS || "Auskunft, Berichtigung, Löschung, Einschränkung, Widerspruch, Beschwerde bei der Aufsichtsbehörde",
    cookies: process.env.DATA_PROTECTION_COOKIES || "Wir verwenden technisch notwendige Cookies für die Funktionalität der Website",
    thirdPartyServices: process.env.THIRD_PARTY_SERVICES ? process.env.THIRD_PARTY_SERVICES.split(',') : ["Resend (E-Mail-Versand)"],
    dataSecurity: process.env.DATA_PROTECTION_SECURITY || "SSL-Verschlüsselung, sichere Server, regelmäßige Updates",
    contactDataProtection: process.env.DATA_PROTECTION_CONTACT || "Bei Fragen zum Datenschutz wenden Sie sich an: datenschutz@stargirlnails.de",
  },
};

export function getLegalConfig(): LegalConfig {
  return defaultLegalConfig;
}
