// Legal pages: Privacy Policy, Terms of Use, MLS® Disclaimer
// Standard content appropriate for a Calgary REALTOR® collecting contact info
// under Canada's PIPEDA + CASL. Review with a lawyer before final publish.
const { useState: useStateL } = React;

const LEGAL = {
  privacy: {
    crumb: 'Privacy Policy',
    title: 'Privacy Policy.',
    updated: 'Last updated: June 2026',
    intro: 'Seenu George (“we”, “us”), a REALTOR® with eXp Realty, respects your privacy and is committed to protecting the personal information you share with us, in accordance with Canada’s Personal Information Protection and Electronic Documents Act (PIPEDA) and Alberta’s Personal Information Protection Act (PIPA).',
    sections: [
      { h: 'Information we collect', p: 'When you contact us, book a showing, register for property alerts, or submit a form, we may collect your name, email address, phone number, and any details you choose to share about your real estate goals (such as budget, preferred communities, and timing).' },
      { h: 'How we use your information', p: 'We use your information solely to respond to your enquiries, provide real estate services, send property listings and market updates you have requested, and connect you with trusted third parties (such as mortgage advisors or lawyers) where you ask us to. We do not sell your personal information to anyone.' },
      { h: 'Consent (CASL)', p: 'By submitting a form on this site, you consent to us contacting you about your enquiry and, where indicated, sending you property and market information. You may withdraw your consent and unsubscribe at any time by replying “unsubscribe” to any message or emailing us at the address below. This is consistent with Canada’s Anti-Spam Legislation (CASL).' },
      { h: 'Property search & MLS® data', p: 'Property searches and account registration on this website are powered by our brokerage’s IDX platform (BoldTrail). When you create an account or search listings, your information is also handled under that platform’s and eXp Realty’s privacy practices.' },
      { h: 'Cookies & analytics', p: 'This website may use cookies and analytics tools (such as Google Analytics) to understand how visitors use the site and to improve it. You can disable cookies in your browser settings. We may also use advertising tools (such as Google Ads) to measure the performance of our campaigns.' },
      { h: 'Storage & protection', p: 'We take reasonable steps to safeguard your information and retain it only as long as necessary to provide our services or as required by law. No method of transmission over the internet is 100% secure, but we work to protect your data.' },
      { h: 'Your rights', p: 'You have the right to access the personal information we hold about you, to request corrections, and to ask that we delete it, subject to legal and professional record-keeping obligations. To make a request, contact us using the details below.' },
      { h: 'Contact', p: 'Questions about this policy or your personal information? Email seenu@homesbyseenu.ca or call +1 (403) 828-2359. eXp Realty, Calgary, #700, 1816 Crowchild Trail NW, Calgary, AB T2M 3Y7.' },
    ],
  },
  terms: {
    crumb: 'Terms of Use',
    title: 'Terms of Use.',
    updated: 'Last updated: June 2026',
    intro: 'These Terms of Use govern your access to and use of this website. By using the site, you agree to these terms. This website is operated by Seenu George, a REALTOR® licensed in Alberta with eXp Realty.',
    sections: [
      { h: 'No guarantee of accuracy', p: 'The information on this website is provided for general information only and is believed to be accurate but is not guaranteed. Property details, prices, and availability are subject to change without notice and should be independently verified. Nothing on this site constitutes legal, financial, or tax advice.' },
      { h: 'Not an offer or agency relationship', p: 'Use of this website does not create an agency, client, or fiduciary relationship. A working relationship is established only through a signed service agreement. Mortgage calculators and estimates are illustrative only and are not an offer of financing or a commitment to lend.' },
      { h: 'MLS® listing data', p: 'Listing information displayed through the property search is provided under license from the applicable real estate board and MLS® system and is subject to its terms (see the MLS® Disclaimer). It may not be reproduced or redistributed except as permitted.' },
      { h: 'Third-party links', p: 'This site links to third-party websites and tools (such as our brokerage’s search platform, lender pages, and social media). We are not responsible for the content, accuracy, or privacy practices of those external sites.' },
      { h: 'Intellectual property', p: 'The design, text, and original content of this website are the property of Seenu George unless otherwise noted. The trademarks REALTOR®, MLS®, and Multiple Listing Service® are owned by The Canadian Real Estate Association (CREA®) and used under license.' },
      { h: 'Limitation of liability', p: 'To the fullest extent permitted by law, we are not liable for any loss or damage arising from your use of, or reliance on, this website or its content. Your use of the site is at your own risk.' },
      { h: 'Contact', p: 'Questions about these terms? Email seenu@homesbyseenu.ca or call +1 (403) 828-2359.' },
    ],
  },
  mls: {
    crumb: 'MLS® Disclaimer',
    title: 'MLS® Disclaimer.',
    updated: 'Last updated: June 2026',
    intro: 'The property listing data and related information displayed on this website is provided under license and is subject to the following terms required by the real estate board(s) and The Canadian Real Estate Association (CREA®).',
    sections: [
      { h: 'Source of data', p: 'Data is supplied by the Pillar 9™ MLS® System. Pillar 9™ is the owner of the copyright in its MLS® System. Data is deemed reliable but is not guaranteed accurate by Pillar 9™.' },
      { h: 'Trademarks', p: 'The trademarks MLS®, Multiple Listing Service® and the associated logos are owned by The Canadian Real Estate Association (CREA®) and identify the quality of services provided by real estate professionals who are members of CREA®. Used under license. The trademarks REALTOR®, REALTORS®, and the REALTOR® logo are controlled by CREA® and identify real estate professionals who are members of CREA®. Used under license.' },
      { h: 'Accuracy & currency', p: 'The listing data displayed is deemed reliable but is not guaranteed accurate by CREA® or by Seenu George. Listing information is updated periodically; for the most current status of any property, please contact us directly. Measurements, room sizes, taxes, and condo fees should be independently verified.' },
      { h: 'Brokerage', p: 'Seenu George is a licensed REALTOR® with eXp Realty, Calgary, #700, 1816 Crowchild Trail NW, Calgary, AB T2M 3Y7. Listing search powered by BoldTrail.' },
    ],
  },
};

function LegalPage({ kind, setPage }) {
  const d = LEGAL[kind] || LEGAL.privacy;
  return (
    <main>
      <div className="page-header shell container">
        <div className="crumbs">Home · <span>{d.crumb}</span></div>
        <h1 className="display">{d.title}</h1>
      </div>

      <section className="section shell container">
        <div className="legal-wrap">
          <p className="kicker" style={{marginBottom: 28}}>{d.updated}</p>
          <p className="lede" style={{maxWidth: '70ch', marginBottom: 56}}>{d.intro}</p>

          {d.sections.map((s, i) => (
            <div key={i} className="legal-block">
              <h2 className="legal-h">{s.h}</h2>
              <p className="legal-p">{s.p}</p>
            </div>
          ))}

          <div style={{marginTop: 48, paddingTop: 28, borderTop: '1px solid var(--hairline)', display: 'flex', gap: 16, flexWrap: 'wrap'}}>
            <button className="btn btn-ghost btn-sm" onClick={() => setPage('privacy')}>Privacy</button>
            <button className="btn btn-ghost btn-sm" onClick={() => setPage('terms')}>Terms of Use</button>
            <button className="btn btn-ghost btn-sm" onClick={() => setPage('mls')}>MLS® Disclaimer</button>
            <button className="btn btn-gold btn-sm" onClick={() => setPage('contact')}>Contact Seenu →</button>
          </div>

          <p className="legal-note">
            This page provides standard, good-faith disclosures for a Calgary REALTOR®. It is not legal advice, Seenu should have her brokerage’s compliance team or a lawyer review the final wording before relying on it.
          </p>
        </div>
      </section>
    </main>
  );
}

window.LegalPage = LegalPage;
