"use client";

import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import NavbarStyleCentered from '@/components/navbar/NavbarStyleCentered/NavbarStyleCentered';
import HeroBillboardGallery from '@/components/sections/hero/HeroBillboardGallery';
import TestimonialAboutCard from '@/components/sections/about/TestimonialAboutCard';
import ProductCardThree from '@/components/sections/product/ProductCardThree';
import FeatureCardTwentySeven from '@/components/sections/feature/FeatureCardTwentySeven';
import TestimonialCardTen from '@/components/sections/testimonial/TestimonialCardTen';
import ContactSplitForm from '@/components/sections/contact/ContactSplitForm';
import FooterLogoReveal from '@/components/sections/footer/FooterLogoReveal';
import { Sprout } from "lucide-react";

const assetMap = {
  "hero-1": {"url":"http://img.b2bpic.net/free-photo/fireplace-hot-bake_1150-10955.jpg","alt":"dark dining table fire grill"},
  "hero-2": {"url":"http://img.b2bpic.net/free-photo/cheff-cutting-pineapple-into-slices-burning-leafy-top_140725-4958.jpg","alt":"chef grilling steak with flames"},
  "hero-3": {"url":"http://img.b2bpic.net/free-photo/penne-pasta-with-parmesan-ceramic-plate-luxury-restaurant_114579-2154.jpg","alt":"elegant pasta dish restaurant"},
  "hero-4": {"url":"http://img.b2bpic.net/free-photo/vintage-lamps-cafe_23-2147785789.jpg","alt":"dark restaurant bar cozy lighting"},
  "hero-5": {"url":"http://img.b2bpic.net/free-photo/view-delicious-dish-food_23-2150777735.jpg","alt":"smoked short rib plate gourmet"},
  "hero-6": {"url":"http://img.b2bpic.net/free-photo/front-view-delicious-chocolate-cake_23-2148549957.jpg","alt":"chocolate lava cake dessert elegant"},
  "about-story": {"url":"http://img.b2bpic.net/free-photo/male-chef-kitchen-cooking_23-2148934672.jpg","alt":"chef in modern kitchen preparing food"},
  "menu-ribeye": {"url":"http://img.b2bpic.net/free-photo/closeup-shot-rare-steak-wooden-board_181624-59117.jpg","alt":"oak grilled ribeye steak perfect"},
  "menu-mac": {"url":"http://img.b2bpic.net/free-photo/macaroni-with-cheese-chicken-mushrooms-baked-oven_2829-11130.jpg","alt":"truffle mac and cheese gourmet"},
  "menu-chicken": {"url":"http://img.b2bpic.net/free-photo/top-close-up-view-chicken-with-lemon-chicken-legs-with-herbs-lemon-left-side-table_140725-110685.jpg","alt":"wood fired chicken plate"},
  "menu-lava": {"url":"http://img.b2bpic.net/free-photo/tart-with-profiteroles-top-with-whipped-cream_114579-85551.jpg","alt":"chocolate lava cake dessert"},
  "menu-cocktail": {"url":"http://img.b2bpic.net/free-photo/milky-cocktail-with-chopped-coconut-inside_114579-3224.jpg","alt":"signature cocktail drink restaurant"},
  "menu-salad": {"url":"http://img.b2bpic.net/free-photo/vegetable-salad-with-tomatoes-onions-cucumbers-greens-lettuce_140725-8108.jpg","alt":"fresh garden salad gourmet"},
  "special-short-rib": {"url":"http://img.b2bpic.net/free-photo/egg-benedict-steak-with-mashed-batata-mushroom-sauce_637285-9511.jpg","alt":"smoked short rib plate"},
  "special-seasonal-dish": {"url":"http://img.b2bpic.net/free-photo/white-fish-fillet-lemon-slices-chips-salad_114579-3300.jpg","alt":"seasonal seafood dish elegant"},
  "special-dessert": {"url":"http://img.b2bpic.net/free-photo/sweet-cake-with-chestnuts-top-view_23-2148395154.jpg","alt":"artisan cheesecake dessert"},
  "testimonial-1": {"url":"http://img.b2bpic.net/free-photo/lunch-break-elegant-man-office-businessman-white-shirt-man-eats-noodles_1157-39257.jpg","alt":"smiling customer satisfied diner"},
  "testimonial-2": {"url":"http://img.b2bpic.net/free-photo/young-happy-waiter-using-digital-tablet-while-talking-couple-taking-their-order-cafe_637285-540.jpg","alt":"chef smiling kitchen portrait"},
  "testimonial-3": {"url":"http://img.b2bpic.net/free-photo/best-friends-are-chatting-laughing-with-tasty-snacks-terrace_8353-10306.jpg","alt":"family dining restaurant happy"},
  "testimonial-4": {"url":"http://img.b2bpic.net/free-photo/top-view-fried-meat-dish-with-glass-wine-table-meat-meal-food_140725-28163.jpg","alt":"sommelier pouring wine glass"},
  "testimonial-5": {"url":"http://img.b2bpic.net/free-photo/couples-celebrating-birthday_23-2149891029.jpg","alt":"couple on date night restaurant"},
  "reservation-bg": {"url":"http://img.b2bpic.net/free-photo/business-woman-cute-young-girl-raising-hand-with-red-lipstick-office-outfit_140725-161412.jpg","alt":"elegant restaurant entrance warm light"},
  "gallery-food": {"url":"http://img.b2bpic.net/free-photo/meal-with-chopped-vegetables-beans_140725-4401.jpg","alt":"gourmet food platter artistic"},
  "gallery-dining": {"url":"http://img.b2bpic.net/free-photo/dinner-set-sushi-rolls-salads-cocktails-hookah-side-view_141793-3100.jpg","alt":"upscale dining room ambiance"},
  "gallery-drinks": {"url":"http://img.b2bpic.net/free-photo/front-view-champagne-glasses-tray_23-2148356449.jpg","alt":"craft cocktails elegant bar"},
  "gallery-dessert": {"url":"http://img.b2bpic.net/free-photo/top-view-roll-cake-with-fruits-inside-white-plate-with-tea-colored-background-cake-biscuit-sweet-color_140725-23040.jpg","alt":"assorted gourmet desserts"},
  "gallery-grill": {"url":"http://img.b2bpic.net/free-photo/crop-man-checking-ashes-bonfire_23-2148253375.jpg","alt":"wood fired grill cooking action"},
  "gallery-chef": {"url":"http://img.b2bpic.net/free-photo/culinary-arts-meet-precision-as-chef-sprinkles-parsley-gourmet-dish_482257-127687.jpg","alt":"chef plating dish elegant"}
};

function getAssetUrl(id) {
  return assetMap[id.replace('asset://', '')]?.url || id;
}

function getAssetAlt(id, fallback) {
  return assetMap[id.replace('asset://', '')]?.alt || fallback;
}

export default function LandingPage() {
  return (
    <ThemeProvider
      defaultButtonVariant="hover-bubble"
      defaultTextAnimation="reveal-blur"
      borderRadius="soft"
      contentWidth="mediumSmall"
      sizing="mediumSizeLargeTitles"
      background="fluid"
      cardStyle="gradient-mesh"
      primaryButtonStyle="double-inset"
      secondaryButtonStyle="glass"
      headingFontWeight="extrabold"
    >
      <div id="nav" data-section="nav">
        <NavbarStyleCentered
          brandName="EMBER & OAK"
          navItems={[
            { name: "Home", id: "#hero" },
            { name: "Our Story", id: "#about" },
            { name: "Menu", id: "#menu" },
            { name: "Specials", id: "#specials" },
            { name: "Testimonials", id: "#testimonials" },
            { name: "Reservations", id: "#reservations" },
            { name: "Gallery", id: "#gallery" }
          ]}
        />
      </div>

      <div id="hero" data-section="hero">
        <HeroBillboardGallery
          title="EMBER & OAK"
          description="Wood-fired flavor. Modern dining. An unforgettable culinary journey awaits you."
          background={{ variant: "plain" }}
          buttons={[
            { text: "View Menu", href: "#menu" },
            { text: "Book a Table", href: "#reservations" }
          ]}
          mediaItems={[
            { imageSrc: getAssetUrl("http://img.b2bpic.net/free-photo/fireplace-hot-bake_1150-10955.jpg"), imageAlt: getAssetAlt("http://img.b2bpic.net/free-photo/fireplace-hot-bake_1150-10955.jpg", "Dark dining table with fire grill") },
            { imageSrc: getAssetUrl("http://img.b2bpic.net/free-photo/cheff-cutting-pineapple-into-slices-burning-leafy-top_140725-4958.jpg"), imageAlt: getAssetAlt("http://img.b2bpic.net/free-photo/cheff-cutting-pineapple-into-slices-burning-leafy-top_140725-4958.jpg", "Chef grilling steak with flames") },
            { imageSrc: getAssetUrl("http://img.b2bpic.net/free-photo/penne-pasta-with-parmesan-ceramic-plate-luxury-restaurant_114579-2154.jpg"), imageAlt: getAssetAlt("http://img.b2bpic.net/free-photo/penne-pasta-with-parmesan-ceramic-plate-luxury-restaurant_114579-2154.jpg", "Elegant pasta dish in a restaurant") },
            { imageSrc: getAssetUrl("http://img.b2bpic.net/free-photo/vintage-lamps-cafe_23-2147785789.jpg"), imageAlt: getAssetAlt("http://img.b2bpic.net/free-photo/vintage-lamps-cafe_23-2147785789.jpg", "Dark restaurant bar with cozy lighting") },
            { imageSrc: getAssetUrl("http://img.b2bpic.net/free-photo/view-delicious-dish-food_23-2150777735.jpg"), imageAlt: getAssetAlt("http://img.b2bpic.net/free-photo/view-delicious-dish-food_23-2150777735.jpg", "Smoked short rib plate gourmet") },
            { imageSrc: getAssetUrl("http://img.b2bpic.net/free-photo/front-view-delicious-chocolate-cake_23-2148549957.jpg"), imageAlt: getAssetAlt("http://img.b2bpic.net/free-photo/front-view-delicious-chocolate-cake_23-2148549957.jpg", "Chocolate lava cake dessert") }
          ]}
          mediaAnimation="opacity"
          useInvertedBackground={true}
        />
      </div>

      <div id="about" data-section="about">
        <TestimonialAboutCard
          tag="Our Roots"
          title="Our Story"
          description="At Ember & Oak, every dish is built around fire, smoke, and fresh ingredients. From wood-grilled steaks to handmade pastas, we bring bold flavor in a warm, modern space, offering a unique dining experience."
          subdescription="Our passion for culinary excellence is matched only by our commitment to using the finest local produce and crafting memorable moments for every guest."
          icon={Sprout}
          imageSrc={getAssetUrl("http://img.b2bpic.net/free-photo/male-chef-kitchen-cooking_23-2148934672.jpg")}
          imageAlt={getAssetAlt("http://img.b2bpic.net/free-photo/male-chef-kitchen-cooking_23-2148934672.jpg", "Chef in modern kitchen preparing food")}
          mediaAnimation="slide-up"
          useInvertedBackground={false}
        />
      </div>

      <div id="menu" data-section="menu">
        <ProductCardThree
          products={[
            { id: "ribeye", name: "Oak-Grilled Ribeye", price: "$38", imageSrc: getAssetUrl("http://img.b2bpic.net/free-photo/closeup-shot-rare-steak-wooden-board_181624-59117.jpg"), imageAlt: getAssetAlt("http://img.b2bpic.net/free-photo/closeup-shot-rare-steak-wooden-board_181624-59117.jpg", "Oak-Grilled Ribeye steak") },
            { id: "mac-cheese", name: "Truffle Mac & Cheese", price: "$16", imageSrc: getAssetUrl("http://img.b2bpic.net/free-photo/macaroni-with-cheese-chicken-mushrooms-baked-oven_2829-11130.jpg"), imageAlt: getAssetAlt("http://img.b2bpic.net/free-photo/macaroni-with-cheese-chicken-mushrooms-baked-oven_2829-11130.jpg", "Truffle Mac & Cheese") },
            { id: "chicken", name: "Wood-Fired Chicken", price: "$28", imageSrc: getAssetUrl("http://img.b2bpic.net/free-photo/top-close-up-view-chicken-with-lemon-chicken-legs-with-herbs-lemon-left-side-table_140725-110685.jpg"), imageAlt: getAssetAlt("http://img.b2bpic.net/free-photo/top-close-up-view-chicken-with-lemon-chicken-legs-with-herbs-lemon-left-side-table_140725-110685.jpg", "Wood-Fired Chicken") },
            { id: "lava-cake", name: "Chocolate Lava Cake", price: "$12", imageSrc: getAssetUrl("http://img.b2bpic.net/free-photo/tart-with-profiteroles-top-with-whipped-cream_114579-85551.jpg"), imageAlt: getAssetAlt("http://img.b2bpic.net/free-photo/tart-with-profiteroles-top-with-whipped-cream_114579-85551.jpg", "Chocolate Lava Cake") },
            { id: "cocktail", name: "Signature Old Fashioned", price: "$14", imageSrc: getAssetUrl("http://img.b2bpic.net/free-photo/milky-cocktail-with-chopped-coconut-inside_114579-3224.jpg"), imageAlt: getAssetAlt("http://img.b2bpic.net/free-photo/milky-cocktail-with-chopped-coconut-inside_114579-3224.jpg", "Signature cocktail") },
            { id: "salad", name: "Seasonal Garden Salad", price: "$10", imageSrc: getAssetUrl("http://img.b2bpic.net/free-photo/vegetable-salad-with-tomatoes-onions-cucumbers-greens-lettuce_140725-8108.jpg"), imageAlt: getAssetAlt("http://img.b2bpic.net/free-photo/vegetable-salad-with-tomatoes-onions-cucumbers-greens-lettuce_140725-8108.jpg", "Seasonal garden salad") }
          ]}
          gridVariant="three-columns-all-equal-width"
          animationType="slide-up"
          title="Featured Menu"
          description="A taste of our wood-fired specialties and modern comfort food. Explore unique flavors crafted with passion."
          buttons={[{ text: "See Full Menu", href: "#" }]}
          textboxLayout="default"
          useInvertedBackground={true}
        />
      </div>

      <div id="specials" data-section="specials">
        <FeatureCardTwentySeven
          features={[
            { id: "smoked-short-rib", title: "Smoked Short Rib Plate", descriptions: ["Slow-cooked to perfection, served with creamy garlic mashed potatoes and chef's selection of seasonal vegetables. A true comfort classic with a smoky twist."], imageSrc: getAssetUrl("http://img.b2bpic.net/free-photo/egg-benedict-steak-with-mashed-batata-mushroom-sauce_637285-9511.jpg"), imageAlt: getAssetAlt("http://img.b2bpic.net/free-photo/egg-benedict-steak-with-mashed-batata-mushroom-sauce_637285-9511.jpg", "Smoked Short Rib Plate") },
            { id: "seasonal-catch", title: "Pan-Seared Scallops", descriptions: ["Fresh, locally sourced scallops with a lemon-butter sauce, asparagus, and roasted cherry tomatoes. A light yet decadent seasonal delight."], imageSrc: getAssetUrl("http://img.b2bpic.net/free-photo/white-fish-fillet-lemon-slices-chips-salad_114579-3300.jpg"), imageAlt: getAssetAlt("http://img.b2bpic.net/free-photo/white-fish-fillet-lemon-slices-chips-salad_114579-3300.jpg", "Pan-Seared Scallops") },
            { id: "dessert-duo", title: "Chef's Dessert Duo", descriptions: ["A delightful pairing of our classic crème brûlée and a rich espresso panna cotta. The perfect sweet ending to your meal."], imageSrc: getAssetUrl("http://img.b2bpic.net/free-photo/sweet-cake-with-chestnuts-top-view_23-2148395154.jpg"), imageAlt: getAssetAlt("http://img.b2bpic.net/free-photo/sweet-cake-with-chestnuts-top-view_23-2148395154.jpg", "Chef's Dessert Duo") }
          ]}
          animationType="slide-up"
          title="Today's Special & Chef's Picks"
          description="Discover our daily inspirations and culinary highlights. Always crafted with the freshest ingredients and a touch of innovative flair."
          textboxLayout="default"
          useInvertedBackground={false}
        />
      </div>

      <div id="testimonials" data-section="testimonials">
        <TestimonialCardTen
          testimonials={[
            { id: "1", title: "An Unforgettable Dining Experience", quote: "Ember & Oak delivers on every front! The wood-fired ribeye was absolutely perfect, and the ambiance was ideal for our anniversary. We'll definitely be back!", name: "Sarah J.", role: "Regular Guest", imageSrc: getAssetUrl("http://img.b2bpic.net/free-photo/lunch-break-elegant-man-office-businessman-white-shirt-man-eats-noodles_1157-39257.jpg"), imageAlt: getAssetAlt("http://img.b2bpic.net/free-photo/lunch-break-elegant-man-office-businessman-white-shirt-man-eats-noodles_1157-39257.jpg", "Satisfied customer") },
            { id: "2", title: "Culinary Excellence at its Best", quote: "The handmade pasta was a revelation. Every dish bursts with flavor, showcasing a true passion for quality ingredients and expert technique. A must-visit in Tampa!", name: "Michael R.", role: "Food Enthusiast", imageSrc: getAssetUrl("http://img.b2bpic.net/free-photo/young-happy-waiter-using-digital-tablet-while-talking-couple-taking-their-order-cafe_637285-540.jpg"), imageAlt: getAssetAlt("http://img.b2bpic.net/free-photo/young-happy-waiter-using-digital-tablet-while-talking-couple-taking-their-order-cafe_637285-540.jpg", "Chef smiling in kitchen") },
            { id: "3", title: "Perfect for Any Occasion", quote: "From intimate dinners to lively gatherings, Ember & Oak provides an exceptional setting. The service is impeccable, and the food consistently outstanding. Highly recommend!", name: "Emily C.", role: "Local Patron", imageSrc: getAssetUrl("http://img.b2bpic.net/free-photo/best-friends-are-chatting-laughing-with-tasty-snacks-terrace_8353-10306.jpg"), imageAlt: getAssetAlt("http://img.b2bpic.net/free-photo/best-friends-are-chatting-laughing-with-tasty-snacks-terrace_8353-10306.jpg", "Family dining happy") },
            { id: "4", title: "A True Gem for Steak Lovers", quote: "As a steak connoisseur, I can confidently say Ember & Oak serves one of the best wood-fired steaks in the region. The smoky flavor is perfectly balanced. Outstanding!", name: "David L.", role: "Culinary Critic", imageSrc: getAssetUrl("http://img.b2bpic.net/free-photo/top-view-fried-meat-dish-with-glass-wine-table-meat-meal-food_140725-28163.jpg"), imageAlt: getAssetAlt("http://img.b2bpic.net/free-photo/top-view-fried-meat-dish-with-glass-wine-table-meat-meal-food_140725-28163.jpg", "Sommelier pouring wine") },
            { id: "5", title: "Warm Ambiance and Delicious Food", quote: "The atmosphere at Ember & Oak is so welcoming, making every visit a pleasure. Their truffle mac & cheese is addictive, and the cocktails are perfectly crafted.", name: "Jessica M.", role: "Happy Diner", imageSrc: getAssetUrl("http://img.b2bpic.net/free-photo/couples-celebrating-birthday_23-2149891029.jpg"), imageAlt: getAssetAlt("http://img.b2bpic.net/free-photo/couples-celebrating-birthday_23-2149891029.jpg", "Couple on date night restaurant") }
          ]}
          title="What Our Guests Say"
          description="Hear from diners who’ve experienced the unique flavors and ambiance of Ember & Oak. Your satisfaction is our highest priority."
          textboxLayout="default"
          useInvertedBackground={true}
        />
      </div>

      <div id="reservations" data-section="reservations">
        <ContactSplitForm
          title="Reserve Your Table"
          description="Plan your visit to Ember & Oak and experience the warmth of our wood-fired cuisine. For general inquiries, please call us directly at (813) 555-0198. We are located at 120 Oak Street, Tampa, FL. Our welcoming hours are Mon–Sun: 4 PM–11 PM. We look forward to hosting you!"
          inputs={[
            { name: "name", type: "text", placeholder: "Your Name", required: true },
            { name: "date", type: "date", placeholder: "Select Date", required: true },
            { name: "time", type: "time", placeholder: "Select Time", required: true },
            { name: "partySize", type: "number", placeholder: "Party Size", required: true }
          ]}
          buttonText="Book Now"
          imageSrc={getAssetUrl("http://img.b2bpic.net/free-photo/business-woman-cute-young-girl-raising-hand-with-red-lipstick-office-outfit_140725-161412.jpg")}
          imageAlt={getAssetAlt("http://img.b2bpic.net/free-photo/business-woman-cute-young-girl-raising-hand-with-red-lipstick-office-outfit_140725-161412.jpg", "Elegant restaurant entrance")}
          mediaAnimation="opacity"
          mediaPosition="right"
          useInvertedBackground={false}
        />
      </div>

      <div id="gallery" data-section="gallery">
        <ProductCardThree
          products={[
            { id: "food-art", name: "", price: "", imageSrc: getAssetUrl("http://img.b2bpic.net/free-photo/meal-with-chopped-vegetables-beans_140725-4401.jpg"), imageAlt: getAssetAlt("http://img.b2bpic.net/free-photo/meal-with-chopped-vegetables-beans_140725-4401.jpg", "Gourmet food platter") },
            { id: "dining-room", name: "", price: "", imageSrc: getAssetUrl("http://img.b2bpic.net/free-photo/dinner-set-sushi-rolls-salads-cocktails-hookah-side-view_141793-3100.jpg"), imageAlt: getAssetAlt("http://img.b2bpic.net/free-photo/dinner-set-sushi-rolls-salads-cocktails-hookah-side-view_141793-3100.jpg", "Upscale dining room ambiance") },
            { id: "cocktails", name: "", price: "", imageSrc: getAssetUrl("http://img.b2bpic.net/free-photo/front-view-champagne-glasses-tray_23-2148356449.jpg"), imageAlt: getAssetAlt("http://img.b2bpic.net/free-photo/front-view-champagne-glasses-tray_23-2148356449.jpg", "Craft cocktails at elegant bar") },
            { id: "dessert-display", name: "", price: "", imageSrc: getAssetUrl("http://img.b2bpic.net/free-photo/top-view-roll-cake-with-fruits-inside-white-plate-with-tea-colored-background-cake-biscuit-sweet-color_140725-23040.jpg"), imageAlt: getAssetAlt("http://img.b2bpic.net/free-photo/top-view-roll-cake-with-fruits-inside-white-plate-with-tea-colored-background-cake-biscuit-sweet-color_140725-23040.jpg", "Assorted gourmet desserts") },
            { id: "live-grill", name: "", price: "", imageSrc: getAssetUrl("http://img.b2bpic.net/free-photo/crop-man-checking-ashes-bonfire_23-2148253375.jpg"), imageAlt: getAssetAlt("http://img.b2bpic.net/free-photo/crop-man-checking-ashes-bonfire_23-2148253375.jpg", "Wood fired grill in action") },
            { id: "chef-plating", name: "", price: "", imageSrc: getAssetUrl("http://img.b2bpic.net/free-photo/culinary-arts-meet-precision-as-chef-sprinkles-parsley-gourmet-dish_482257-127687.jpg"), imageAlt: getAssetAlt("http://img.b2bpic.net/free-photo/culinary-arts-meet-precision-as-chef-sprinkles-parsley-gourmet-dish_482257-127687.jpg", "Chef plating a dish elegantly") }
          ]}
          gridVariant="three-columns-all-equal-width"
          animationType="slide-up"
          title="Our Culinary Journey: A Visual Feast"
          description="Step into the world of Ember & Oak through our vibrant gallery. From exquisite dishes to our inviting ambiance, every image tells a story of passion and flavor."
          textboxLayout="default"
          useInvertedBackground={true}
        />
      </div>

      <div id="footer" data-section="footer">
        <FooterLogoReveal
          logoText="EMBER & OAK"
          leftLink={{ text: "Privacy Policy", href: "#" }}
          rightLink={{ text: "Terms of Service", href: "#" }}
          useInvertedBackground={false}
        />
      </div>
    </ThemeProvider>
  );
}
