"use client";

import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import NavbarStyleFullscreen from '@/components/navbar/NavbarStyleFullscreen/NavbarStyleFullscreen';
import LegalSection from '@/components/legal/LegalSection';
import FooterBaseCard from '@/components/sections/footer/FooterBaseCard';

export default function TermsOfServicePage() {
  return (
    <ThemeProvider
      defaultButtonVariant="icon-arrow"
      defaultTextAnimation="entrance-slide"
      borderRadius="rounded"
      contentWidth="smallMedium"
      sizing="largeSizeMediumTitles"
      background="aurora"
      cardStyle="soft-shadow"
      primaryButtonStyle="double-inset"
      secondaryButtonStyle="radial-glow"
      headingFontWeight="extrabold"
    >
      <div id="nav" data-section="nav">
        <NavbarStyleFullscreen
          navItems={[
            { name: "Home", id: "hero" },
            { name: "About", id: "about" },
            { name: "Adopt", id: "product" },
            { name: "Testimonials", id: "testimonial" },
            { name: "Contact", id: "contact" },
            { name: "Privacy Policy", id: "/privacy-policy" },
            { name: "Terms of Service", id: "/terms-of-service" }
          ]}
          brandName="PawShelter"
          bottomLeftText="Saving Lives, One Paw at a Time"
          bottomRightText="info@pawshelter.org"
        />
      </div>

      <div id="legal-content" data-section="legal-content">
        <LegalSection
          layout="page"
          title="Terms of Service"
          subtitle="Last updated: January 15, 2025"
          sections={[
            {
              heading: "1. Acceptance of Terms",              content: [
                {
                  type: "paragraph",                  text: "By accessing and using the PawShelter website and mobile application (collectively, the \"Service\"), you agree to be bound by these Terms of Service (\"Terms\"). If you do not agree to these Terms, you may not use the Service. We reserve the right to modify these Terms at any time, and such modifications will be effective upon posting to the Service."
                },
                {
                  type: "paragraph",                  text: "Your continued use of the Service following any such modification constitutes your acceptance of the modified Terms."
                }
              ]
            },
            {
              heading: "2. Description of Service",              content: [
                {
                  type: "paragraph",                  text: "PawShelter is an online platform dedicated to pet adoption and rescue services. Our Service provides users with information about available pets, adoption processes, volunteer opportunities, and related services. We strive to maintain accurate and current information, but we do not warrant the completeness, accuracy, or reliability of any information on the Service."
                }
              ]
            },
            {
              heading: "3. User Eligibility and Responsibilities",              content: [
                {
                  type: "paragraph",                  text: "By using the Service, you represent and warrant that you are at least 18 years of age (or the age of majority in your jurisdiction) and have the legal authority to enter into these Terms."
                },
                {
                  type: "paragraph",                  text: "You agree to:"
                },
                {
                  type: "list",                  items: [
                    "Provide accurate, current, and complete information during registration",                    "Maintain the confidentiality of your account credentials",                    "Accept responsibility for all activities that occur under your account",                    "Use the Service only for lawful purposes and in accordance with these Terms",                    "Not interfere with or disrupt the integrity or performance of the Service",                    "Not use the Service to harass, abuse, or harm others"
                  ]
                }
              ]
            },
            {
              heading: "4. Adoption Policies and Agreements",              content: [
                {
                  type: "paragraph",                  text: "All pet adoptions through PawShelter are subject to our adoption policies and procedures. By submitting an adoption application, you:"
                },
                {
                  type: "list",                  items: [
                    "Acknowledge that you have read and understand our adoption requirements",                    "Agree to allow PawShelter to conduct background checks and home visits if necessary",                    "Confirm that you will provide appropriate care, veterinary attention, and a safe home for the adopted pet",                    "Understand that adoption fees are non-refundable unless the adoption is not finalized",                    "Agree to comply with all applicable local, state, and federal animal welfare laws",                    "Authorize PawShelter to follow up on the welfare of the adopted pet"
                  ]
                },
                {
                  type: "paragraph",                  text: "PawShelter reserves the right to deny or revoke any adoption application at our sole discretion. If an adopted pet is not properly cared for or if the adoption agreement is violated, PawShelter reserves the right to reclaim the animal."
                }
              ]
            },
            {
              heading: "5. Intellectual Property Rights",              content: [
                {
                  type: "paragraph",                  text: "All content on the Service, including text, graphics, logos, images, audio, video, and software, is the property of PawShelter or its content suppliers and is protected by copyright and other intellectual property laws. You may not reproduce, distribute, transmit, modify, or create derivative works of any content without our prior written consent."
                },
                {
                  type: "paragraph",                  text: "You are granted a limited, non-exclusive license to access and use the Service for personal, non-commercial purposes only."
                }
              ]
            },
            {
              heading: "6. User-Generated Content",              content: [
                {
                  type: "paragraph",                  text: "If you submit, post, or display content on the Service (including comments, photos, testimonials, or other materials), you grant PawShelter a worldwide, royalty-free, perpetual, and irrevocable license to use, reproduce, modify, adapt, and publish such content. You represent and warrant that you own or have the necessary rights to the content you submit."
                },
                {
                  type: "paragraph",                  text: "You agree not to submit content that is:"
                },
                {
                  type: "list",                  items: [
                    "Defamatory, obscene, offensive, or threatening",                    "Infringes on any third-party intellectual property rights",                    "Violates any applicable law or regulation",                    "Promotes illegal, unethical, or harmful activities"
                  ]
                }
              ]
            },
            {
              heading: "7. Limitation of Liability",              content: [
                {
                  type: "paragraph",                  text: "TO THE MAXIMUM EXTENT PERMITTED BY LAW, PAWSHELTER AND ITS OFFICERS, DIRECTORS, EMPLOYEES, AND AGENTS SHALL NOT BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES, INCLUDING BUT NOT LIMITED TO LOSS OF PROFITS, DATA, OR BUSINESS INTERRUPTION, ARISING OUT OF OR IN CONNECTION WITH THE SERVICE, EVEN IF PAWSHELTER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES."
                },
                {
                  type: "paragraph",                  text: "IN NO EVENT SHALL PAWSHELTER'S TOTAL LIABILITY TO YOU FOR ALL CLAIMS ARISING OUT OF THE SERVICE EXCEED THE AMOUNT YOU HAVE PAID TO PAWSHELTER IN THE 12 MONTHS PRECEDING THE CLAIM."
                }
              ]
            },
            {
              heading: "8. Disclaimer of Warranties",              content: [
                {
                  type: "paragraph",                  text: "THE SERVICE IS PROVIDED ON AN \"AS IS\" AND \"AS AVAILABLE\" BASIS WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED. PAWSHELTER DISCLAIMS ALL WARRANTIES, INCLUDING BUT NOT LIMITED TO MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT."
                },
                {
                  type: "paragraph",                  text: "PAWSHELTER DOES NOT WARRANT THAT:"
                },
                {
                  type: "list",                  items: [
                    "The Service will be uninterrupted, error-free, or secure",                    "Defects will be corrected",                    "The Service is free of viruses or other harmful components",                    "The results obtained from the Service will meet your expectations"
                  ]
                }
              ]
            },
            {
              heading: "9. Indemnification",              content: [
                {
                  type: "paragraph",                  text: "You agree to indemnify, defend, and hold harmless PawShelter and its officers, directors, employees, and agents from any claims, damages, losses, and expenses (including reasonable attorney fees) arising out of or related to your use of the Service, violation of these Terms, or infringement of any third-party rights."
                }
              ]
            },
            {
              heading: "10. Links to Third-Party Sites",              content: [
                {
                  type: "paragraph",                  text: "The Service may contain links to third-party websites and services that are not operated by PawShelter. We do not endorse or assume responsibility for these third-party sites, their content, or their privacy practices. Your use of third-party sites is subject to their terms of service and privacy policies."
                }
              ]
            },
            {
              heading: "11. Termination",              content: [
                {
                  type: "paragraph",                  text: "PawShelter may suspend or terminate your account and access to the Service at any time, with or without cause, and without prior notice or liability. Grounds for termination include, but are not limited to, violation of these Terms, illegal activity, or misuse of the Service."
                },
                {
                  type: "paragraph",                  text: "Upon termination, your right to use the Service will immediately cease. All provisions of these Terms that by their nature should survive termination will survive."
                }
              ]
            },
            {
              heading: "12. Governing Law",              content: [
                {
                  type: "paragraph",                  text: "These Terms shall be governed by and construed in accordance with the laws of the United States, without regard to its conflict of law provisions. Any legal action or proceeding relating to these Terms shall be brought exclusively in the federal or state courts located in the jurisdiction where PawShelter is headquartered."
                }
              ]
            },
            {
              heading: "13. Dispute Resolution",              content: [
                {
                  type: "paragraph",                  text: "Before initiating any legal proceeding, you agree to attempt to resolve any dispute by contacting us at support@pawshelter.org. If the dispute cannot be resolved informally within 30 days, either party may pursue formal legal action in accordance with Section 12 of these Terms."
                }
              ]
            },
            {
              heading: "14. Severability",              content: [
                {
                  type: "paragraph",                  text: "If any provision of these Terms is found to be invalid or unenforceable, that provision shall be modified to the minimum extent necessary to make it valid and enforceable, and the remaining provisions shall remain in full force and effect."
                }
              ]
            },
            {
              heading: "15. Entire Agreement",              content: [
                {
                  type: "paragraph",                  text: "These Terms, together with our Privacy Policy and any other policies or agreements referenced herein, constitute the entire agreement between you and PawShelter regarding the Service and supersede all prior or contemporaneous agreements, understandings, and communications."
                }
              ]
            },
            {
              heading: "16. Contact Information",              content: [
                {
                  type: "paragraph",                  text: "If you have questions, concerns, or requests regarding these Terms of Service, please contact us at:"
                },
                {
                  type: "list",                  items: [
                    "Email: legal@pawshelter.org",                    "Phone: 1-800-PAWSHELTER",                    "Mailing Address: PawShelter, 123 Animal Care Lane, Pet City, PC 12345"
                  ]
                },
                {
                  type: "paragraph",                  text: "We will respond to your inquiry within 30 days."
                }
              ]
            }
          ]}
        />
      </div>

      <div id="footer" data-section="footer">
        <FooterBaseCard
          logoText="PawShelter"
          columns={[
            {
              title: "Adopt",              items: [
                { label: "Available Pets", href: "#product" },
                { label: "Adoption Process", href: "#" },
                { label: "Success Stories", href: "#testimonial" },
                { label: "Privacy Policy", href: "/privacy-policy" },
                { label: "Terms of Service", href: "/terms-of-service" }
              ]
            },
            {
              title: "Support",              items: [
                { label: "Volunteer", href: "#contact" },
                { label: "Donate", href: "#" },
                { label: "Become a Sponsor", href: "#" }
              ]
            },
            {
              title: "About",              items: [
                { label: "Our Mission", href: "#about" },
                { label: "Meet the Team", href: "#" },
                { label: "Contact Us", href: "#contact" }
              ]
            },
            {
              title: "Resources",              items: [
                { label: "Pet Care Tips", href: "#" },
                { label: "Blog", href: "#" },
                { label: "FAQ", href: "#" }
              ]
            }
          ]}
          copyrightText="© 2025 PawShelter. All rights reserved. Saving lives, one paw at a time."
        />
      </div>
    </ThemeProvider>
  );
}
