import React from "react";
import type { Metadata } from "next";
import LegalDocument, { ContactLink, type LegalSection } from "@/components/sections/LegalDocument";

export const metadata: Metadata = {
  title: "Privacy Policy – Doormile",
  description:
    "How Doormile collects, uses, stores, and protects your information when you visit our website, interact with our services, or communicate with us.",
};

const sections: LegalSection[] = [
  {
    heading: "Information We Collect",
    blocks: [
      { type: "p", text: "We may collect the following information:" },
      {
        type: "ul",
        items: [
          "Full name",
          "Email address",
          "Phone number",
          "Company name",
          "Job title",
          "Information submitted through contact forms",
          "Service inquiry details",
          "Website usage data and analytics",
          "Browser, device, and IP information",
        ],
      },
    ],
  },
  {
    heading: "How We Use Your Information",
    blocks: [
      { type: "p", text: "We use your information to:" },
      {
        type: "ul",
        items: [
          "Respond to inquiries and support requests",
          "Provide information about our services",
          "Improve website performance and user experience",
          "Analyze usage trends and platform effectiveness",
          "Maintain security and prevent unauthorized access",
          "Communicate service updates and business information",
          "Comply with legal and regulatory requirements",
        ],
      },
    ],
  },
  {
    heading: "Information Sharing",
    blocks: [
      {
        type: "p",
        text: "Doormile does not sell, rent, or trade personal information. Information may be shared with trusted service providers that assist with website hosting, analytics, communications, and operational support, subject to appropriate confidentiality and security obligations.",
      },
    ],
  },
  {
    heading: "Data Security",
    blocks: [
      {
        type: "p",
        text: "We implement industry-standard administrative, technical, and organizational safeguards designed to protect personal information from unauthorized access, disclosure, alteration, or destruction.",
      },
    ],
  },
  {
    heading: "Data Retention",
    blocks: [
      {
        type: "p",
        text: "We retain information only for as long as necessary to fulfill the purposes described in this policy, comply with legal obligations, resolve disputes, and enforce agreements.",
      },
    ],
  },
  {
    heading: "Cookies and Tracking Technologies",
    blocks: [
      {
        type: "p",
        text: "We use cookies and similar technologies to improve website functionality, measure performance, understand user behavior, and enhance user experience.",
      },
    ],
  },
  {
    heading: "Your Rights",
    blocks: [
      { type: "p", text: "Depending on applicable laws, you may have the right to:" },
      {
        type: "ul",
        items: [
          "Access your personal information",
          "Request correction of inaccurate data",
          "Request deletion of personal information",
          "Restrict or object to certain processing activities",
          "Withdraw consent where applicable",
        ],
      },
    ],
  },
  {
    heading: "Third-Party Links",
    blocks: [
      {
        type: "p",
        text: "Our website may contain links to third-party websites. We are not responsible for the privacy practices or content of external websites.",
      },
    ],
  },
  {
    heading: "Policy Updates",
    blocks: [
      {
        type: "p",
        text: "We may update this Privacy Policy periodically. Any changes will be posted on this page with a revised effective date.",
      },
    ],
  },
  {
    heading: "Contact Us",
    blocks: [
      {
        type: "p",
        text: <>For privacy-related questions or requests, please contact us through our <ContactLink />.</>,
      },
    ],
  },
];

export default function PrivacyPolicyPage() {
  return (
    <div className="content-wrapper content-wrapper-may-contain-elementor-code content-wrapper-sidebar-position-none">
      <div className="content">
        <div className="content-inner">
          <LegalDocument
            title="Privacy Policy"
            lastUpdated="June 2026"
            intro="At Doormile, we are committed to protecting your privacy and maintaining the security of the information you share with us. This Privacy Policy outlines how we collect, use, store, and protect your information when you visit our website, interact with our services, or communicate with us."
            sections={sections}
          />
        </div>
      </div>
    </div>
  );
}
