﻿import React from 'react';
import { Head, Link } from '@inertiajs/react';
import { PublicLayout } from '@/Layouts/PublicLayout';

interface Props {
    page: 'privacy' | 'terms' | 'cancellation';
}

export default function Policies({ page }: Props) {
    const titles = {
        privacy: 'Privacy & Data Protection Policy',
        terms: 'Terms & Conditions of Stay',
        cancellation: 'Booking & Cancellation Policies',
    };

    return (
        <PublicLayout>
            <Head title={`${titles[page]} — Primon Hotel Naalya`} />

            <section className="py-24 bg-[#1A1A1A] text-[#FBF9F5] border-b border-[#C5A880]/20 text-center">
                <div className="max-w-3xl mx-auto px-4 sm:px-6 lg:px-8 space-y-3">
                    <span className="text-xs uppercase tracking-[0.3em] text-[#C5A880] font-semibold">
                        Legal & Guest Protections
                    </span>
                    <h1 className="font-serif text-3xl sm:text-5xl font-light text-white">
                        {titles[page]}
                    </h1>
                </div>
            </section>

            <section className="py-16 bg-[#FBF9F5]">
                <div className="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 bg-white p-8 sm:p-12 rounded-3xl border border-gray-200 shadow-sm space-y-8 text-xs sm:text-sm text-gray-700 leading-relaxed font-light">
                    {page === 'privacy' && (
                        <div className="space-y-4">
                            <h3 className="font-serif text-xl font-medium text-[#1A1A1A]">1. Data Collection & Purpose</h3>
                            <p>
                                Primon Hotel collects guest information solely to facilitate reservations, ensure guest safety, process secure transactions via Pesapal, and provide personalized boutique hospitality during your stay in Kampala.
                            </p>
                            <h3 className="font-serif text-xl font-medium text-[#1A1A1A]">2. Payment Data Security</h3>
                            <p>
                                All online transactions are processed through encrypted, PCI-DSS compliant payment gateways (Pesapal 3.0). Primon Hotel never stores or has access to your raw credit card numbers or PINs.
                            </p>
                            <h3 className="font-serif text-xl font-medium text-[#1A1A1A]">3. Marketing Consent</h3>
                            <p>
                                You may unsubscribe from promotional society communications at any time via the 1-click link in our newsletters.
                            </p>
                        </div>
                    )}

                    {page === 'terms' && (
                        <div className="space-y-4">
                            <h3 className="font-serif text-xl font-medium text-[#1A1A1A]">1. Check-In & Check-Out Times</h3>
                            <p>
                                Standard check-in begins at 14:00 (2:00 PM). Check-out is at 11:00 (11:00 AM). Early check-in or late check-out may be arranged subject to availability or booked as an add-on extra.
                            </p>
                            <h3 className="font-serif text-xl font-medium text-[#1A1A1A]">2. Identification Requirements</h3>
                            <p>
                                All arriving guests must present a valid passport or national ID card upon check-in in compliance with Ugandan hospitality regulations.
                            </p>
                            <h3 className="font-serif text-xl font-medium text-[#1A1A1A]">3. Smoking Policy</h3>
                            <p>
                                All indoor guest rooms and public indoor areas are strictly non-smoking. Designated smoking areas are provided on private balconies and rooftop garden terraces.
                            </p>
                        </div>
                    )}

                    {page === 'cancellation' && (
                        <div className="space-y-4">
                            <h3 className="font-serif text-xl font-medium text-[#1A1A1A]">1. Best Available Rate (Flexible)</h3>
                            <p>
                                Cancellations or modifications made up to 24 hours prior to 14:00 on the day of arrival are free of charge with full deposit refund.
                            </p>
                            <h3 className="font-serif text-xl font-medium text-[#1A1A1A]">2. Non-Refundable Rates</h3>
                            <p>
                                Non-refundable promotional rates are discounted and non-changeable. In the event of cancellation or no-show, the full stay amount will be retained.
                            </p>
                            <h3 className="font-serif text-xl font-medium text-[#1A1A1A]">3. No-Show Policy</h3>
                            <p>
                                Failure to arrive on the scheduled check-in date without prior notification will result in room release and forfeiture of the first night deposit.
                            </p>
                        </div>
                    )}

                    <div className="pt-6 border-t border-gray-200">
                        <Link href="/" className="text-xs font-semibold uppercase text-[#C5A880] hover:underline">
                            ← Return to Primon Hotel Home
                        </Link>
                    </div>
                </div>
            </section>
        </PublicLayout>
    );
}
