'use client';
import { ThemeProvider } from 'next-themes';
import NavbarStyleCentered from '@/components/navbar/NavbarStyleCentered/NavbarStyleCentered';
import TextBox from '@/components/Textbox';
import SocialProofOne from '@/components/sections/socialProof/SocialProofOne';
import FooterBaseReveal from '@/components/sections/footer/FooterBaseReveal';

export default function CartPage() {
  const navItems = [
    { name: "Home", id: "/" },
    { name: "Cart", id: "/cart" },
    { name: "Checkout", id: "/checkout" },
    { name: "Order Conf", id: "/order-confirmation" }
  ];

  return (
    <ThemeProvider
      attribute="class"
      defaultButtonVariant="hover-magnetic"
      defaultTextAnimation="entrance-slide"
      borderRadius="rounded"
      contentWidth="medium"
      sizing="medium"
      background="none"
      cardStyle="solid"
      primaryButtonStyle="gradient"
      secondaryButtonStyle="glass"
      headingFontWeight="bold"
    >
      <NavbarStyleCentered navItems={navItems} brandName="Webild" logoSrc="https://via.placeholder.com/40" />
      <main className="flex min-h-screen flex-col items-center justify-between p-4 md:p-8">
        <section id="cart" data-section="cart" className="w-full max-w-4xl py-12">
          <TextBox
            title="Your Shopping Cart"
            description="Review your items before proceeding to checkout. You can modify quantities or remove items here."
            textboxLayout="default"
            buttons={[
              {
                text: "Proceed to Checkout",                href: "/checkout"
              },
            ]}
          >
            <div className="mt-8 space-y-4">
              <div className="flex items-center justify-between p-4 border rounded-lg shadow-sm">
                <div>
                  <h3 className="font-semibold">Product A</h3>
                  <p className="text-sm text-gray-500">Quantity: 1</p>
                </div>
                <p className="font-medium">$99.00</p>
              </div>
              <div className="flex items-center justify-between p-4 border rounded-lg shadow-sm">
                <div>
                  <h3 className="font-semibold">Product B</h3>
                  <p className="text-sm text-gray-500">Quantity: 2</p>
                </div>
                <p className="font-medium">$150.00</p>
              </div>
              <div className="flex items-center justify-between p-4 border-t-2 mt-6 pt-6 font-bold text-lg">
                <span>Total:</span>
                <span>$249.00</span>
              </div>
            </div>
          </TextBox>
        </section>

        <section id="trust-signals-cart" data-section="trust-signals-cart" className="w-full max-w-4xl py-12">
          <SocialProofOne
            title="Secure & Trusted Shopping"
            description="Shop with confidence knowing your data is protected."
            names={['Stripe', 'PayPal', 'Shopify', 'McAfee Secure']}
            textboxLayout='default'
            showCard={true}
          />
        </section>
      </main>
      <FooterBaseReveal
        logoText="Webild"
        columns={[
          {
            title: "Company",            items: [
              { label: "About Us", href: "/" },
              { label: "Contact", href: "/" },
            ],
          },
          {
            title: "Legal",            items: [
              { label: "Privacy Policy", href: "/" },
              { label: "Terms of Service", href: "/" },
            ],
          },
        ]}
        copyrightText="© 2023 Webild. All rights reserved."
      />
    </ThemeProvider>
  );
}
