<script lang="ts">
    import Title from "$lib/components/atoms/title.svelte";
    import { COMPANY_NAME, CONTACT_INFO } from "$lib/core/constants";
    import TableOfContents from "../table-of-contents.svelte";

    const toc = [
        { title: "Information We Collect", link: "#information-we-collect" },
        {
            title: "How We Use Your Information",
            link: "#how-we-use-your-information",
        },
        { title: "Data Protection", link: "#data-protection" },
        { title: "Data Sharing", link: "#data-sharing" },
        { title: "Your Rights", link: "#your-rights" },
        { title: "Data Retention", link: "#data-retention" },
        { title: "Changes to Policy", link: "#changes-to-policy" },
        { title: "Contact Us", link: "#contact-us" },
    ];

    const lastUpdated = "January 5, 2025";
</script>

<section class="flex w-full flex-col-reverse gap-6 md:gap-8 lg:flex-row">
    <div
        class="col-span-3 flex w-full flex-col gap-4 rounded-lg border border-green-200 drop-shadow-lg bg-gradient-to-b from-green-50 to-green/30 p-4 md:p-8"
    >
        <Title size="h1" weight="medium">Privacy Policy</Title>
        <p>
            {COMPANY_NAME} is committed to protecting your privacy and ensuring the
            security of your personal and financial information. This Privacy Policy
            explains how we collect, use, and protect your data when you use our
            bill negotiation services.
        </p>

        <Title size="h3" weight="medium" id="information-we-collect"
            >1. Information We Collect</Title
        >
        <p>
            We may collect the following types of information, based on the
            situation, and mostly what is provided to us by you:
        </p>
        <ul class="list-disc pl-4">
            <li>
                Personal Information:
                <ul class="list-disc pl-4">
                    <li>Full name and contact details</li>
                    <li>Billing addresses</li>
                    <li>Service provider account information</li>
                    <li>Payment information</li>
                </ul>
            </li>
            <li>
                Bill Information:
                <ul class="list-disc pl-4">
                    <li>Current service provider details</li>
                    <li>Bill statements and history</li>
                    <li>Service plan details</li>
                    <li>Usage patterns and preferences</li>
                </ul>
            </li>
            <li>
                Website Usage:
                <ul class="list-disc pl-4">
                    <li>Device and browser information</li>
                    <li>IP address and location data</li>
                    <li>How you interact with our website</li>
                </ul>
            </li>
        </ul>

        <Title size="h3" weight="medium" id="how-we-use-your-information"
            >2. How We Use Your Information</Title
        >
        <p>We use your information to:</p>
        <ul class="list-disc pl-4">
            <li>Negotiate with service providers on your behalf</li>
            <li>Analyze your current bills for savings opportunities</li>
            <li>Contact service providers for better rates</li>
            <li>Process service changes and updates</li>
            <li>Improve our negotiation strategies</li>
            <li>Communicate service updates and savings opportunities</li>
            <li>Generate anonymized statistics about our services</li>
            <li>Prevent fraud and ensure security</li>
        </ul>

        <Title size="h3" weight="medium" id="data-protection"
            >3. Data Protection</Title
        >
        <p>We implement robust security measures including:</p>
        <ul class="list-disc pl-4">
            <li>Encryption of sensitive financial data</li>
            <li>Secure access controls and authentication</li>
            <li>Regular security audits and updates</li>
            <li>Staff training on data protection</li>
            <li>Secure data backup systems</li>
            <li>Incident response procedures</li>
        </ul>

        <Title size="h3" weight="medium" id="data-sharing"
            >4. Data Sharing</Title
        >
        <p>We may share your information with:</p>
        <ul class="list-disc pl-4">
            <li>Service providers (only as needed for negotiations)</li>
            <li>Payment processors for billing purposes</li>
            <li>Legal authorities when required by law</li>
            <li>Third-party services essential to our operations</li>
        </ul>
        <p class="mt-2">
            We never sell your personal information to third parties or use it
            for marketing purposes without your consent.
        </p>

        <Title size="h3" weight="medium" id="your-rights">5. Your Rights</Title>
        <p>You have the right to:</p>
        <ul class="list-disc pl-4">
            <li>Request access your personal data</li>
            <li>Correct inaccurate information</li>
            <li>Request deletion of your data</li>
            <li>Restrict or object to processing</li>
            <li>Data portability</li>
            <li>Withdraw consent at any time</li>
        </ul>

        <Title size="h3" weight="medium" id="data-retention"
            >6. Data Retention</Title
        >
        <p>
            We retain your information for as long as needed to provide our
            services and comply with legal obligations. Typically, this means:
        </p>
        <ul class="list-disc pl-4">
            <li>
                Account information: While your account is active plus 2 years
            </li>
            <li>Billing records: 7 years for tax purposes</li>
            <li>Negotiation records: 3 years after service completion</li>
            <li>Communication records: 2 years</li>
        </ul>

        <Title size="h3" weight="medium" id="changes-to-policy"
            >7. Changes to Policy</Title
        >
        <p>
            We may update this privacy policy to reflect changes in our
            practices or legal requirements. So please keep checking this page
            from time to time to stay informed.
        </p>

        <Title size="h3" weight="medium" id="contact-us">8. Contact Us</Title>
        <p>
            If you have questions about this privacy policy or wish to exercise
            your rights, please contact us at:
        </p>
        <ul class="list-disc pl-4 mt-2">
            <li>Email: {CONTACT_INFO.email}</li>
            <li>Phone: {CONTACT_INFO.phone}</li>
            <li>Address: {CONTACT_INFO.address}</li>
        </ul>

        <small class="text-gray-500 mt-4">Last Updated: {lastUpdated}</small>
    </div>

    <TableOfContents {toc} />
</section>
