1import{av as H,r as o,u as q,o as Q,j as e,L as Y,I as J,B as i,am as K,C as c,a1 as j,a2 as N,a3 as y,a4 as d,co as X,cp as Z,M as ee,N as se,aa as L,bd as P,P as A,an as te,bb as ae,bi as re}from"./index-CU4TP-S4.js";import{T as ie,a as le,b as ne,c as oe}from"./tabs-DGAvBb6E.js";import{u as ce}from"./useB2bProducts-BK0ZAAOM.js";import{S as x}from"./skeleton-CytUjfKO.js";import{T as u}from"./trending-down-CTGfhGAA.js";import{G as de}from"./glass-water-CjCqMEeU.js";import{B as me,S as V}from"./sprout-7fo1kprW.js";import{S as v}from"./shield-B37Jafy4.js";function Ne(){const[,l]=H(),[p,B]=o.useState(""),[I,M]=o.useState(!1),[w,k]=o.useState(!1),[t,h]=o.useState(0),[C,g]=o.useState(0);o.useState(!1),o.useState({name:"",businessName:"",email:""}),o.useState(!1);const[S,z]=o.useState("wine"),{toast:f}=q(),{data:m,isLoading:$}=ce(),{data:a=[],isLoading:D}=Q({queryKey:["/api/b2b/slideshow/slides"]}),b={wine:"Wine",spirits:"Spirits",beer:"Beer",canned_cocktail:"Canned Cocktails",canned_wine:"Canned Wine",cider:"Cider"},W=Object.keys(b),T=o.useMemo(()=>{if(!m)return{};const s={};for(const r of m){const n=r.category||"wine";s[n]||(s[n]=[]),s[n].push(r)}return s},[m]);T[S];const G=async s=>{s.preventDefault(),k(!0);try{(await(await fetch("/api/b2b/verify-code",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:p})})).json()).valid?(M(!0),sessionStorage.setItem("b2b_verified","true"),f({title:"Access Granted",description:"Welcome to our wholesale platform"})):f({title:"Invalid Access Code",description:"Please check your code and try again",variant:"destructive"})}catch{f({title:"Error",description:"Failed to verify access code",variant:"destructive"})}finally{k(!1)}},U={Sprout:V,Users:te,Wine:L,Package:A,TrendingDown:u,Shield:v,Heart:ae,Star:re},_=s=>!s||s==="none"?null:s==="Logo"?"Logo":U[s]||null,E={enter:s=>({x:s>0?300:-300,opacity:0}),center:{x:0,opacity:1},exit:s=>({x:s<0?300:-300,opacity:0})},O=()=>{t<a.length-1&&(g(1),h(t+1))},R=()=>{t>0&&(g(-1),h(t-1))},F=s=>{g(s>t?1:-1),h(s)};return I?e.jsxs("div",{className:"min-h-screen bg-gradient-to-b from-background to-muted",children:[e.jsxs("div",{className:"relative overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-primary/90 via-primary/70 to-primary/50 z-10"}),e.jsx("img",{src:"/winery-aerial.webp",alt:"Nashoba Valley Winery",className:"absolute inset-0 w-full h-full object-cover"}),e.jsx("div",{className:"relative z-20 max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-16 md:py-24",children:e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"mb-6 flex justify-center",children:e.jsx("img",{src:"/nvw-logo.png",alt:"Nashoba Valley Winery Logo",className:"w-32 md:w-40 h-auto object-contain drop-shadow-2xl",style:{mixBlendMode:"multiply"}})}),e.jsx("h1",{className:"text-3xl md:text-4xl lg:text-5xl font-serif font-light text-primary-foreground mb-3",children:"Wholesale Pricing"}),e.jsx("p",{className:"text-lg md:text-xl text-primary-foreground/90 max-w-2xl mx-auto",children:"Premium products from our working farm to your business"})]})})]}),e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12",children:[e.jsxs(c,{className:"mb-12",children:[e.jsxs(j,{children:[e.jsx(N,{className:"font-serif text-2xl md:text-3xl text-center",children:"Why Partner With Nashoba Valley Winery"}),e.jsx(y,{className:"text-center text-base",children:"Supporting local farms while offering exceptional products"})]}),e.jsx(d,{children:D?e.jsxs("div",{className:"py-12 space-y-4",children:[e.jsx(x,{className:"h-64 w-full"}),e.jsxs("div",{className:"flex justify-center gap-2",children:[e.jsx(x,{className:"h-2.5 w-2.5 rounded-full"}),e.jsx(x,{className:"h-2.5 w-2.5 rounded-full"}),e.jsx(x,{className:"h-2.5 w-2.5 rounded-full"})]})]}):a.length===0?e.jsx("div",{className:"py-12 text-center text-muted-foreground",children:e.jsx("p",{children:"No slideshow content available at this time."})}):e.jsxs("div",{className:"relative",children:[e.jsx(X,{initial:!1,custom:C,mode:"wait",children:e.jsx(Z.div,{custom:C,variants:E,initial:"enter",animate:"center",exit:"exit",transition:{x:{type:"spring",stiffness:300,damping:30},opacity:{duration:.2}},className:"py-8",children:e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8 items-start",children:[a[t].mediaType!=="none"&&a[t].mediaUrl&&e.jsx("div",{className:"md:col-span-1 flex flex-col gap-4",children:a[t].mediaType==="image"?e.jsxs(e.Fragment,{children:[e.jsx("img",{src:a[t].mediaUrl,alt:a[t].title,className:"w-full h-auto rounded-lg object-cover"}),a[t].additionalMediaIds&&a[t].additionalMediaIds.length>0&&a[t].additionalMediaIds.map((s,r)=>e.jsx("img",{src:`/api/media-library/${s}/file`,alt:`${a[t].title} - image ${r+2}`,className:"w-full h-auto rounded-lg object-cover"},s))]}):a[t].mediaType==="video"?e.jsx("video",{src:a[t].mediaUrl,controls:!0,className:"w-full h-auto rounded-lg",children:"Your browser does not support the video tag."}):null}),e.jsx("div",{className:a[t].mediaType!=="none"&&a[t].mediaUrl?"md:col-span-2":"md:col-span-3",children:e.jsxs("div",{className:"text-center max-w-3xl mx-auto",children:[(()=>{const s=_(a[t].iconName);return s==="Logo"?e.jsx("div",{className:"flex justify-center mb-6",children:e.jsx("img",{src:"/nvw-logo.png",alt:"Nashoba Valley Winery Logo",className:"h-16 w-auto object-contain"})}
1):s?e.jsx("div",{className:"flex justify-center mb-6",children:e.jsx(s,{className:"h-16 w-16 text-primary"})}):null})(),e.jsx("h3",{className:"text-2xl md:text-3xl font-serif font-light mb-4",children:a[t].title}),e.jsx("div",{className:"text-base md:text-lg text-muted-foreground mb-6 leading-relaxed prose prose-sm max-w-none",dangerouslySetInnerHTML:{__html:a[t].content||""}}),a[t].highlight&&e.jsx("div",{className:"inline-block bg-primary/10 border border-primary/20 rounded-lg px-6 py-3",children:e.jsx("p",{className:"text-sm md:text-base font-medium text-primary",children:a[t].highlight})}),t===a.length-1&&e.jsxs("div",{className:"mt-8",children:[e.jsxs(i,{size:"lg",onClick:()=>l("/b2b/pricing-sheet"),className:"gap-2 text-lg px-8 py-6","data-testid":"button-view-pricing-sheet",children:[e.jsx(u,{className:"h-5 w-5"}),"View B2B Pricing Sheet"]}),e.jsx("p",{className:"text-sm text-muted-foreground mt-3",children:"See detailed pricing and profit margins by tier"})]})]})})]})},t)}),e.jsxs("div",{className:"flex justify-between items-center mt-8 gap-4",children:[e.jsxs(i,{variant:"outline",onClick:R,disabled:t===0,className:"gap-2","data-testid":"button-prev-slide",children:[e.jsx(ee,{className:"w-4 h-4"}),"Back"]}),e.jsx("div",{className:"flex gap-2",children:a.map((s,r)=>e.jsx("button",{onClick:()=>F(r),className:`h-2.5 rounded-full transition-all duration-300 ${r===t?"w-8 bg-primary":"w-2.5 bg-muted-foreground/40 hover:bg-muted-foreground/60"}`,"data-testid":`dot-slide-${r}`,"aria-label":`Go to slide ${r+1}`},r))}),e.jsxs(i,{onClick:O,disabled:t===a.length-1,className:"gap-2","data-testid":"button-next-slide",children:["Next",e.jsx(se,{className:"w-4 h-4"})]})]})]})})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8 mb-12",children:[e.jsxs(c,{children:[e.jsxs(j,{children:[e.jsxs(N,{className:"font-serif text-2xl flex items-center gap-2",children:[e.jsx(L,{className:"h-6 w-6 text-primary"}),"Additional Services We Offer"]}),e.jsx(y,{children:"Enhance your business with our value-added services"})]}),e.jsxs(d,{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(de,{className:"h-5 w-5 text-primary mt-0.5 flex-shrink-0"}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-sm mb-1",children:"In-Store Tastings & Wine Dinners"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Let us host an in-store tasting or wine dinner featuring our premium adult beverages"})]})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(me,{className:"h-5 w-5 text-primary mt-0.5 flex-shrink-0"}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-sm mb-1",children:"Sample Program"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Get 1-ounce samples of our wines mailed directly to your store"})]})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(P,{className:"h-5 w-5 text-primary mt-0.5 flex-shrink-0"}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-sm mb-1",children:"Winery Tours"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Set up a visit to our winery for you and your staff to explore our products and our passion"})]})]}),e.jsxs("div",{className:"pt-6 border-t",children:[e.jsxs("div",{className:"mb-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx(u,{className:"h-5 w-5 text-primary"}),e.jsx("h3",{className:"font-semibold text-lg",children:"Wholesale Pricing Tiers"})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Category-specific pricing for different beverage types"})]}),$?e.jsx("div",{className:"space-y-3",children:[...Array(3)].map((s,r)=>e.jsx(x,{className:"h-16 w-full"},r))}):!m||m.length===0?e.jsx("p",{className:"text-sm text-muted-foreground py-4 text-center",children:"No active pricing tiers available at this time"}):e.jsxs(ie,{value:S,onValueChange:z,className:"mt-4",children:[e.jsx(le,{className:"flex flex-wrap w-full h-auto gap-2 p-2",children:W.map(s=>e.jsx(ne,{value:s,"data-testid":`tab-${s}-pricing`,className:"flex-1 min-w-[100px]",children:b[s]},s))}),W.map(s=>{const r=T[s]||[];return e.jsx(oe,{value:s,className:"mt-4",children:r.length===0?e.jsxs("p",{className:"text-sm text-muted-foreground py-4 text-center",children:["No active pricing tiers for ",b[s]]}):e.jsx("div",{className:"space-y-3",children:r.map(n=>e.jsxs("div",{className:"flex items-center justify-between p-3 rounded-lg border bg-card hover-elevate","data-testid":`tier-${n.tierName}`,children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-semibold",children:n.tierName}),e.jsx("p",{className:"text-xs text-muted-foreground",children:n.description||"Wholesale pricing"})]}),e.jsxs("div",{className:"text-right",children:[e.jsxs("p",{className:"text-xl font-bold text-primary",children:[n.discountPercentage,"%"]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"off retail"})]})]},n.id))})},s)})]}),e.jsx("div",{className:"mt-4 p-3 bg-muted/50 rounded-lg",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(A,{className:"h-5 w-5 text-primary mt-0.5"}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-sm mb-1",children:"Case Quantities"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"All orders are calculated by case (12 bottles per case)"})]})]})})]})]})]}),e.jsxs(c,{children:[e.jsxs(j,{children:[e.jsxs(N,{className:"font-serif text-2xl flex items-center gap-2",children:[e.jsx(v,{className:"h-6 w-6 text-primary"}),"Ready to Get Started?"]}),e.jsx(y,{children:"Set up your wholesale account to start ordering"})]}),e.jsxs(d,{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"h-8 w-8 rounded-full bg-primary text-primary-foreground flex items-center justify-center flex-shrink-0 font-semibold",children:"1"}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium mb-1",children:"Create Account"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Register with your business details"})]})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"h-8 w-8 rounded-full bg-primary text-primary-foreground flex items-center justify-center flex-shrink-0 font-semibold",children:"2"}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium mb-1",children:"Qu
1ick Approval"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Our team reviews your account (typically within 24 hours)"})]})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"h-8 w-8 rounded-full bg-primary text-primary-foreground flex items-center justify-center flex-shrink-0 font-semibold",children:"3"}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium mb-1",children:"Start Ordering"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Browse products and place orders at your tier pricing"})]})]})]}),e.jsx(i,{size:"lg",className:"w-full text-lg py-6",onClick:()=>l("/b2b/register"),"data-testid":"button-setup-account",children:"Set Up Your Account"}),e.jsxs("div",{className:"pt-4 border-t",children:[e.jsx("p",{className:"text-sm text-center text-muted-foreground mb-3",children:"Already have an account?"}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[e.jsx(i,{type:"button",variant:"outline",className:"flex-1",onClick:()=>l("/b2b/login/customer"),"data-testid":"button-customer-login-bottom",children:"Customer Login"}),e.jsx(i,{type:"button",variant:"outline",className:"flex-1",onClick:()=>l("/b2b/login/admin"),"data-testid":"button-admin-login-bottom",children:"Admin Login"})]})]})]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-8",children:[e.jsx(c,{className:"text-center",children:e.jsxs(d,{className:"pt-6",children:[e.jsx(u,{className:"h-12 w-12 mx-auto mb-4 text-primary"}),e.jsx("h3",{className:"font-semibold text-lg mb-2",children:"Wholesale Discounts"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Get incredible savings on our new tiered pricing for annual purchases"})]})}),e.jsx(c,{className:"text-center",children:e.jsxs(d,{className:"pt-6",children:[e.jsx(V,{className:"h-12 w-12 mx-auto mb-4 text-primary"}),e.jsx("h3",{className:"font-semibold text-lg mb-2",children:"Local & Sustainable"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Support a working farm committed to sustainable agriculture"})]})}),e.jsx(c,{className:"text-center",children:e.jsxs(d,{className:"pt-6",children:[e.jsx(v,{className:"h-12 w-12 mx-auto mb-4 text-primary"}),e.jsx("h3",{className:"font-semibold text-lg mb-2",children:"Dedicated Support"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Assigned sales representative for personalized service"})]})})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row justify-center gap-4",children:[e.jsxs(i,{size:"lg",variant:"outline",onClick:()=>l("/b2b/where-to-buy"),className:"gap-2 text-lg px-12 py-6","data-testid":"button-where-to-buy",children:[e.jsx(P,{className:"h-5 w-5"}),"Where to Buy"]}),e.jsxs(i,{size:"lg",onClick:()=>l("/b2b/pricing-sheet"),className:"gap-2 text-lg px-12 py-6","data-testid":"button-proceed-to-pricing",children:[e.jsx(u,{className:"h-5 w-5"}),"Proceed to Pricing Sheet"]})]})]})]}):e.jsxs("div",{className:"relative min-h-screen flex items-center justify-center",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-primary/90 via-primary/70 to-primary/50 z-10"}),e.jsx("img",{src:"/winery-aerial.webp",alt:"Nashoba Valley Winery Aerial View",className:"absolute inset-0 w-full h-full object-cover"}),e.jsxs("div",{className:"relative z-20 w-full max-w-2xl px-6 py-12 text-center",children:[e.jsx("div",{className:"mb-8 flex justify-center",children:e.jsx("img",{src:"/nvw-logo.png",alt:"Nashoba Valley Winery Logo",className:"w-48 h-auto object-contain drop-shadow-2xl",style:{mixBlendMode:"multiply"}})}),e.jsx("h1",{className:"font-serif text-4xl md:text-5xl lg:text-6xl font-light text-primary-foreground mb-4 tracking-wide leading-tight",children:"Nashoba Valley Winery"}),e.jsx("p",{className:"text-2xl md:text-3xl text-primary-foreground/90 mb-4 font-light",children:"Wholesale Program"}),e.jsx("p",{className:"text-lg text-primary-foreground/80 mb-12 max-w-xl mx-auto",children:"Premium wines, spirits, and craft beverages from our working farm"}),e.jsx("form",{onSubmit:G,className:"space-y-4",children:e.jsxs("div",{className:"bg-background/95 backdrop-blur-md rounded-lg p-6 shadow-xl",children:[e.jsx(Y,{htmlFor:"access-code",className:"text-base mb-3 block",children:"Enter Access Code to View Wholesale Pricing"}),e.jsx(J,{id:"access-code","data-testid":"input-access-code",type:"text",placeholder:"Enter your Wholesale Access Code Here",value:p,onChange:s=>B(s.target.value.toUpperCase()),className:"text-center text-xl font-mono tracking-wider border-2 border-primary/30 bg-background/50 focus-visible:ring-2 focus-visible:border-primary py-6 mb-4",required:!0}),e.jsx(i,{type:"submit","data-testid":"button-verify-code",size:"lg",className:"w-full py-6 text-lg font-medium",disabled:w||!p,children:w?"Verifying...":"
1View Wholesale Pricing"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-4",children:"No Access Code? Press the Request button below"})]})}),e.jsxs("div",{className:"mt-8 space-y-3",children:[e.jsx("p",{className:"text-sm text-primary-foreground/70",children:"Already have an account?"}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 justify-center flex-wrap",children:[e.jsx(i,{variant:"outline",className:"bg-background/20 backdrop-blur-sm border-primary-foreground/30 text-primary-foreground hover:bg-background/30",onClick:()=>l("/b2b/login/customer"),"data-testid":"button-customer-login",children:"Customer Login"}),e.jsx(i,{variant:"outline",className:"bg-background/20 backdrop-blur-sm border-primary-foreground/30 text-primary-foreground hover:bg-background/30",onClick:()=>l("/b2b/login/sales-rep"),"data-testid":"button-sales-rep-login",children:"Sales Rep Login"}),e.jsx(i,{variant:"outline",className:"bg-background/20 backdrop-blur-sm border-primary-foreground/30 text-primary-foreground hover:bg-background/30",onClick:()=>l("/b2b/login/admin"),"data-testid":"button-admin-login",children:"Admin Login"})]})]}),e.jsxs("div",{className:"mt-8 text-center",children:[e.jsx("p",{className:"text-sm text-primary-foreground/70 mb-3",children:"Want to become a wholesale partner?"}),e.jsxs(i,{variant:"outline",className:"bg-background/20 backdrop-blur-sm border-primary-foreground/30 text-primary-foreground hover:bg-background/30 gap-2",onClick:()=>l("/b2b/register"),"data-testid":"button-apply-wholesale",children:[e.jsx(K,{className:"h-4 w-4"}),"Apply for Wholesale Account"]})]})]})]})}export{Ne as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.