PageSourceSearch

https://eliteweddingsandeventswithcara.com/assets/SupplierAuth-C6_pqKU3.js

js eliteweddingsandeventswithcara.com collected 2026-09-30 06:36:21 UTC 30,385 bytes, 7 lines download raw bytes

1import{j as e,B as w,z as _,S as G,C as B,H as te,d as I,h as A,e as $,M as U,a7 as R,V as P,U as re,f as ae,A as oe,r as d,L as h,g as V,I as v,m as H,u as f,s as j,X as ie,n as le,P as ne,o as de,J as ce,N as me,a as ue,Y as xe}from"./index-DaxYHL_c.js";import{B as pe}from"./badge-BgIO1kHT.js";import{E as O}from"./Elite2027Announcement-vk5qrOp0.js";import{B as ge}from"./building-JLdte1nf.js";import{Z as J}from"./zap-DiFGlUZa.js";import{T as he}from"./trending-up-BbjbvywI.js";import{M as be}from"./message-square-CxfFIDVA.js";import{I as fe}from"./image-Dgq5GkHQ.js";import{l as ve}from"./index-CWLezO9i.js";import{L as T}from"./lock-DPqnL3Iu.js";import{o as Z,s as b,e as je,a as Ne}from"./types-D0HQDW0D.js";import{S as ye}from"./stripeTiers-D6mjG3Ok.js";import{B as we}from"./building-2-BOtdQgRw.js";import"./shield-check-4NVZlJnT.js";import"./external-link-KPfB8_RY.js";const Ce="/assets/elite-badge-DR1FIxiQ.png",Se=()=>e.jsx("section",{className:"py-20 bg-background",children:e.jsx("div",{className:"container mx-auto px-4",children:e.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 items-center",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"font-display text-3xl md:text-4xl text-foreground mb-6",children:"Discover our Elite Vow Collective members"}),e.jsx("p",{className:"text-muted-foreground text-lg mb-8 leading-relaxed",children:"Look out for the Elite Vow Collective badge on tablecloths at our shows and across their online profiles. Membership is our premium paid tier, giving suppliers enhanced visibility, priority placement and standout profile features — making them easy to spot as you explore your options. Membership is a subscription, not a personal endorsement, so we always encourage couples to view portfolios, read reviews and carry out their own checks before booking."}),e.jsx(w,{asChild:!0,className:"bg-primary hover:bg-primary/90 text-primary-foreground px-8 py-6 text-lg font-semibold",children:e.jsx(_,{to:"/suppliers",children:"Search Suppliers"})})]}),e.jsx("div",{className:"relative flex justify-center",children:e.jsx("img",{src:Ce,alt:"Elite Vow Collective Badge",className:"max-w-md w-full rounded-lg shadow-xl"})})]})})}),ke=()=>e.jsx("section",{className:"py-16 bg-gradient-to-b from-background to-muted/50",children:e.jsxs("div",{className:"container mx-auto px-4 max-w-4xl",children:[e.jsxs("div",{className:"text-center mb-10",children:[e.jsxs(pe,{className:"mb-4 bg-gold/20 text-gold border-gold/30 text-sm px-4 py-1",children:[e.jsx(G,{className:"w-4 h-4 mr-1"}),"The Future of Wedding Events"]}),e.jsx("h2",{className:"font-display text-3xl md:text-4xl text-foreground mb-3",children:"Why We're Doing Things Differently"}),e.jsx("p",{className:"text-muted-foreground text-lg max-w-2xl mx-auto",children:"Large-scale wedding fairs leave couples overwhelmed and suppliers lost in the crowd. We believe planning your wedding should be exciting, not exhausting."})]}),e.jsxs(B,{className:"mb-6 border-primary/20 overflow-hidden",children:[e.jsx("div",{className:"bg-primary/5 px-6 py-4 border-b border-primary/10",children:e.jsxs("h3",{className:"font-display text-xl text-foreground flex items-center gap-2",children:[e.jsx(te,{className:"w-5 h-5 text-primary"}),"For Couples — An Experience, Not an Ordeal"]})}),e.jsxs(I,{className:"pt-6",children:[e.jsx("p",{className:"text-muted-foreground mb-4",children:"We've listened. Couples tell us they're tired of trailing around massive exhibition halls talking to dozens of suppliers in the same category. Our intimate venue showcases are designed to make wedding planning fun again."}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:["Held at beautiful wedding venues you could actually book","Maximum 3 suppliers per category — quality over quantity","Welcome drinks on arrival to set the mood","Catwalk moments & VIP reserved seating available","Exclusive offers only available at the showcase","No rushing — smaller crowds mean real conversations"].map((t,r)=>e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(A,{className:"w-4 h-4 text-primary mt-0.5 shrink-0"}),e.jsx("span",{className:"text-sm text-muted-foreground",children:t})]},r))})]})]}),e.jsxs(B,{className:"mb-6 border-gold/30 overflow-hidden",children:[e.jsx("div",{className:"bg-gold/10 px-6 py-4 border-b border-gold/20",children:e.jsxs("h3",{className:"font-display text-xl text-foreground flex items-center gap-2",children:[e.jsx($,{className:"w-5 h-5 text-gold"}),"For Suppliers — Better Leads, Less Competition"]})}),e.jsxs(I,{className:"pt-6",children:[e.jsx("p",{className:"text-muted-foreground mb-4",children:"Stop competing with 10+ other businesses in your category. Our venue-led showcases attract couples who already love the setting — meaning warmer, higher-quality leads that are genuinely ready to book."}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:["Max 3 suppliers per category — no category clashes","Smaller, engaged audiences with genuine booking intent","Venue-attracted couples = warmer, qualified leads","Premium positioning in a curated environment","Elite members get 48-hour priority booking for spaces","Enhanced digital promotion between events"].map((t,r)=>e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(A,{className:"w-4 h-4 text-gold mt-0.5 shrink-0"}),e.jsx("span",{className:"text-sm text-muted-foreground",children:t})]},r))})]})]}),e.jsxs(B,{className:"border-accent/30 overflow-hidden",children:[e.jsx("div",{className:"bg-accent/10 px-6 py-4 border-b border-accent/20",children:e.jsxs("h3",{className:"font-display text-xl text-foreground flex items-center gap-2",children:[e.jsx(U,{className:"w-5 h-5 text-accent"}),"Venue Partners — Host a Showcase"]})}),e.jsxs(I,{className:"pt-6",children:[e.jsx("p",{className:"text-muted-foreground mb-4",children:"Your venue takes centre stage. We handle marketing, supplier curation and event coordination — you simply provide the stunning setting and a warm welcome for attending couples. Zero cost to you."}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Interested?"," ",e.jsx("a",{href:"mailto:[email protected]",className:"text-primary font-semibold hover:underline",children:"Get in touch →"})]})]})]})]})}),Pe=()=>{const t=R(),r=[{id:"free",name:"Free Membership",monthlyPrice:"£0",yearlyPrice:"£0",period:"forever",description:"Get started and showcase your business",icon:J,color:"text-muted-foreground",bgColor:"bg-muted",borderColor:"border-border",onlineFeatures:["Basic business listing","Contact information display","1 profile image","Listed in directory"]},{id:"standard",name:"Standard Membership",monthlyPrice:"£10",period:"per month",description:"Grow your business with powerful tools",icon:A,color:"text-primary",bgColor:"bg-primary/10",borderColor:"border-primary",popular:!0,onlineFeatures:["Featured as Recognised Supplier","Up to 3 gallery images","Video portfolio showcase","Social media links","Social media promotion","Enquiry notifications","Basic analytics dashboard","Enquiry response templates","Response time badge","Priority customer support"],offlineFeatures:["Access to venue showcase bookings","10% off magazine advertising"]},{id:"elite",name:"Elite Vow Collective",monthlyPrice:"£20",period:"per month",description:"Maximum exposure & exclusive perks",icon:$,color:"text-gold",bgColor:"bg-gold/10",borderColor:"border-gold",onlineFeatures:["Pri
1ority search ranking","Homepage spotlight rotation","Couple wishlist alerts","Unlimited gallery images","Video testimonials showcase","Pinned reviews at top","Custom profile themes","Multi-location listings","Larger, stand-out profile cards","Verified badge on profile","360° virtual tour integration",'"Featured Elite Member" badge',"Elite badge & priority placement","AI-powered enquiry replies","AI Wedding Match inclusion","Contract management system","Advanced analytics & insights","Conversion analytics","Peak demand insights","Pricing benchmarks","Promotions & marketing tools","Email campaigns to saved couples","QR code generator","Portfolio PDF export","Calendar sync (Google/iCal)","Review response manager","Referral program access","Achievement badges","Co-branded marketing materials","Training resources & webinars","API access for integrations","Early access to new features"],offlineFeatures:["48-hour priority booking for venue showcases","Featured position at intimate showcases","20% off magazine advertising","Directory feature in every magazine","Showcase attendee data access (GDPR)","First to know about new venue partnerships","VIP goody bag literature","Dedicated account manager"]}],a=[{icon:re,title:"Reach Engaged Couples",description:"Connect with couples actively planning their wedding in North Wales and beyond"},{icon:he,title:"Grow Your Business",description:"Track enquiries, views, and conversions with our analytics dashboard"},{icon:ae,title:"Manage Availability",description:"Keep your calendar updated so couples know when you're available"},{icon:be,title:"Direct Messaging",description:"Chat directly with interested couples through our secure messaging system"},{icon:fe,title:"Showcase Your Work",description:"Display your portfolio with high-quality images and detailed descriptions"},{icon:oe,title:"Build Your Reputation",description:"Collect reviews from happy couples to build trust and credibility"}];return e.jsx("section",{className:"py-20 bg-gradient-to-b from-background to-muted/30",children:e.jsxs("div",{className:"container mx-auto px-4",children:[e.jsxs("div",{className:"text-center mb-16",children:[e.jsx("span",{className:"inline-block px-4 py-2 bg-gold/10 text-gold rounded-full text-sm font-medium mb-4",children:"For Wedding Suppliers"}),e.jsx("h2",{className:"text-4xl md:text-5xl font-serif font-bold text-foreground mb-4",children:"Grow Your Wedding Business"}),e.jsx("p",{className:"text-lg text-muted-foreground max-w-2xl mx-auto",children:"Join North Wales' premier wedding directory and connect with couples planning their perfect day"})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 mb-20",children:a.map((s,n)=>e.jsxs("div",{className:"p-6 bg-card rounded-xl border border-border hover:border-gold/50 transition-all hover:shadow-lg group",children:[e.jsx("div",{className:"w-12 h-12 bg-gold/10 rounded-lg flex items-center justify-center mb-4 group-hover:bg-gold/20 transition-colors",children:e.jsx(s.icon,{className:"w-6 h-6 text-gold"})}),e.jsx("h3",{className:"text-lg font-semibold text-foreground mb-2",children:s.title}),e.jsx("p",{className:"text-muted-foreground text-sm",children:s.description})]},n))}),e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h3",{className:"text-3xl font-serif font-bold text-foreground mb-4",children:"Choose Your Membership"}),e.jsx("p",{className:"text-muted-foreground mb-6",children:"Select the plan that best fits your business needs"})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8 max-w-5xl mx-auto items-start",children:[r.filter(s=>s.id==="free").map(s=>{const n=s.icon,o=s.id==="elite",i=s.id==="free"?"£0":s.monthlyPrice;return e.jsxs("div",{className:`relative p-8 rounded-2xl border-2 ${s.borderColor} bg-card transition-all hover:shadow-xl ${s.popular?"scale-105 shadow-lg":""}`,children:[s.popular&&e.jsx("div",{className:"absolute -top-4 left-1/2 -translate-x-1/2 px-4 py-1 bg-primary text-primary-foreground text-sm font-semibold rounded-full",children:"Most Popular"}),e.jsx("div",{className:`w-14 h-14 ${s.bgColor} rounded-xl flex items-center justify-center mb-6`,children:e.jsx(n,{className:`w-7 h-7 ${s.color}`})}),e.jsx("h4",{className:`text-2xl font-bold mb-2 ${o?"text-gold":"text-foreground"}`,children:s.name}),e.jsxs("div",{className:"mb-4",children:[e.jsx("span",{className:`text-4xl font-bold ${o?"text-gold":"text-foreground"}`,children:i}),e.jsx("span",{className:"text-muted-foreground text-sm ml-1",children:s.period})]}),e.jsx("p",{className:"text-muted-foreground text-sm mb-6",children:s.description}),e.jsxs("div",{className:"mb-4",children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-3",children:[e.jsx(G,{className:"w-4 h-4 text-primary"}),e.jsx("span",{className:"text-xs font-semibold text-primary uppercase tracking-wide",children:"Digital Features"})]}),e.jsx("ul",{className:"space-y-2",children:s.onlineFeatures.map((l,c)=>e.jsxs("li",{className:"flex items-start gap-2 text-sm",children:[e.jsx(P,{className:`w-4 h-4 mt-0.5 shrink-0 ${o?"text-gold":"text-green-500"}`}),e.jsx("span",{className:"text-foreground",children:l})]},c))})]}),s.offlineFeatures&&s.offlineFeatures.length>0&&e.jsxs("div",{className:"pt-4 border-t border-border/50",children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-3",children:[e.jsx(ge,{className:`w-4 h-4 ${o?"text-gold":"text-primary"}`}),e.jsx("span",{className:`text-xs font-semibold uppercase tracking-wide ${o?"text-gold":"text-primary"}`,children:"Show & Print Benefits"})]}),e.jsx("ul",{className:"space-y-2",children:s.offlineFeatures.map((l,c)=>e.jsxs("li",{className:"flex items-start gap-2 text-sm",children:[e.jsx(P,{className:`w-4 h-4 mt-0.5 shrink-0 ${o?"text-gold":"text-green-500"}`}),e.jsx("span",{className:"text-foreground",children:l})]},c))})]}),e.jsx(w,{onClick:()=>t("/supplier-auth"),className:`w-full mt-6 ${o?"bg-gold hover:bg-gold/90 text-secondary":s.id==="standard"?"bg-primary hover:bg-primary/90":"bg-muted hover:bg-muted/80 text-foreground"}`,children:"Get Started"})]},s.id)}),e.jsx(O,{})]}),e.jsxs("div",{className:"mt-16 text-center",children:[e.jsx("p",{className:"text-muted-foreground mb-4",children:"Ready to grow your wedding business?"}),e.jsx(w,{size:"lg",onClick:()=>t("/supplier-auth"),className:"bg-gold hover:bg-gold/90 text-secondary px-8",children:"Join as a Supplier"})]})]})})},Ee=Z({email:b().trim().email({message:"Invalid email address"}),password:b().min(6,{message:"Password must be at least 6 characters"})}),Fe=()=>
1{const t=R(),[r,a]=d.useState(!1),[s,n]=d.useState(""),[o,i]=d.useState(""),[l,c]=d.useState({}),L=async m=>{m.preventDefault(),c({});const E=Ee.safeParse({email:s,password:o});if(!E.success){const F={};E.error.errors.forEach(y=>{y.path[0]&&(F[y.path[0]]=y.message)}),c(F);return}a(!0);const{error:N}=await j.auth.signInWithPassword({email:s,password:o});N?f.error(N.message):(f.success("Welcome back!"),t("/supplier-dashboard")),a(!1)};return e.jsxs("form",{onSubmit:L,className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{htmlFor:"login-email",children:"Email"}),e.jsxs("div",{className:"relative",children:[e.jsx(V,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(v,{id:"login-email",type:"email",placeholder:"[email protected]",value:s,onChange:m=>n(m.target.value),className:"pl-10"})]}),l.email&&e.jsx("p",{className:"text-sm text-destructive",children:l.email})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{htmlFor:"login-password",children:"Password"}),e.jsxs("div",{className:"relative",children:[e.jsx(T,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(v,{id:"login-password",type:"password",placeholder:"••••••••",value:o,onChange:m=>i(m.target.value),className:"pl-10"})]}),l.password&&e.jsx("p",{className:"text-sm text-destructive",children:l.password}),e.jsx("div",{className:"text-right",children:e.jsx(_,{to:"/reset-password?source=supplier",className:"text-sm text-primary hover:underline",children:"Forgot password?"})})]}),e.jsxs(w,{type:"submit",className:"w-full bg-gold text-secondary hover:bg-gold/90",disabled:r,children:[r&&e.jsx(H,{className:"w-4 h-4 animate-spin mr-2"}),"Sign In"]}),e.jsxs("div",{className:"relative my-4",children:[e.jsx("div",{className:"absolute inset-0 flex items-center",children:e.jsx("span",{className:"w-full border-t border-border"})}),e.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:e.jsx("span",{className:"bg-card px-2 text-muted-foreground",children:"Or"})})]}),e.jsxs(w,{type:"button",variant:"outline",className:"w-full gap-2",onClick:async()=>{const m=await ve.auth.signInWithOAuth("google",{redirect_uri:window.location.origin});m.error&&f.error(m.error.message)},children:[e.jsxs("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",children:[e.jsx("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 01-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z",fill:"#4285F4"}),e.jsx("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),e.jsx("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC05"}),e.jsx("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"})]}),"Continue with Google"]})]})},Me=["Basic business listing","Contact information display","1 profile image","Listed in directory"],Be=({value:t,onChange:r})=>{const a=t==="free";return e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 items-start",children:[e.jsxs("button",{type:"button",onClick:s=>{s.preventDefault(),r("free")},className:`flex flex-col p-5 rounded-xl border-2 text-left transition-all ${a?"border-primary bg-primary/5 shadow-md":"border-border hover:border-primary/50"}`,children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx("div",{className:"p-2 rounded-lg bg-muted text-muted-foreground",children:e.jsx(J,{className:"w-5 h-5"})}),e.jsx("span",{className:"font-bold text-lg text-foreground",children:"Free Listing"})]}),e.jsxs("div",{className:"mb-4",children:[e.jsx("span",{className:"text-3xl font-bold text-foreground",children:"£0"}),e.jsx("span",{className:"text-sm text-muted-foreground ml-1",children:"Forever free"})]}),e.jsx("ul",{className:"space-y-1.5",children:Me.map(s=>e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx(P,{className:"w-4 h-4 mt-0.5 shrink-0 text-primary"}),e.jsx("span",{className:"text-muted-foreground text-xs",children:s})]},s))}),e.jsx("div",{className:`mt-4 py-2 text-center rounded-lg font-medium text-sm ${a?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground"}`,children:a?"Selected":"Select Free Listing"})]}),e.jsx(O,{})]})},Ie=[{value:"north-wales",label:"North Wales"},{value:"south-wales",label:"South Wales"},{value:"mid-wales",label:"Mid Wales"},{value:"cheshire",label:"Cheshire"},{value:"shropshire",label:"Shropshire"},{value:"north-west-england",label:"North West England"},{value:"north-east-england",label:"North East England"},{value:"midlands",label:"Midlands"},{value:"south-england",label:"South England"},{value:"scotland",label:"Scotland"},{value:"northern-ireland",label:"Northern Ireland"}],Re=({selectedRegions:t,onRegionsChange:r,maxSelections:a,error:s})=>{const n=o=>
1{if(t.includes(o))r(t.filter(l=>l!==o));else{if(a&&t.length>=a)return;r([...t,o])}};return e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"grid grid-cols-2 gap-2 max-h-48 overflow-y-auto p-1",children:Ie.map(o=>{const i=t.includes(o.value),l=a!==void 0&&t.length>=a&&!i;return e.jsxs("div",{onClick:()=>!l&&n(o.value),className:`
2                flex items-center space-x-2 p-2 rounded-md border transition-all text-left select-none
3                ${i?"border-gold bg-gold/10 cursor-pointer":l?"border-border bg-muted opacity-50 cursor-not-allowed":"border-border hover:border-gold/50 cursor-pointer"}
4              `,children:[e.jsx("div",{className:`
5                h-4 w-4 shrink-0 rounded-sm border flex items-center justify-center
6                ${i?"bg-primary border-primary text-primary-foreground":"border-primary"}
7              `,children:i&&e.jsx(P,{className:"h-3 w-3"})}),e.jsx("span",{className:"text-sm",children:o.label})]},o.value)})}),s&&e.jsx("p",{className:"text-sm text-destructive",children:s})]})},Le=({password:t})=>{const r=d.useMemo(()=>({length:t.length>=8,uppercase:/[A-Z]/.test(t),lowercase:/[a-z]/.test(t),number:/[0-9]/.test(t),special:/[^A-Za-z0-9]/.test(t)}),[t]),a=d.useMemo(()=>{const s=Object.values(r).filter(Boolean).length;return s===0?{level:0,label:"",color:""}:s<=2?{level:1,label:"Weak",color:"bg-destructive"}:s<=3?{level:2,label:"Fair",color:"bg-amber-500"}:s<=4?{level:3,label:"Good",color:"bg-emerald-400"}:{level:4,label:"Strong",color:"bg-emerald-500"}},[r]);return t?e.jsxs("div",{className:"space-y-2 mt-2",children:[e.jsx("div",{className:"flex gap-1",children:[1,2,3,4].map(s=>e.jsx("div",{className:`h-1.5 flex-1 rounded-full transition-colors ${s<=a.level?a.color:"bg-muted"}`},s))}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:"Password strength:"}),e.jsx("span",{className:`text-xs font-medium ${a.level<=1?"text-destructive":a.level===2?"text-amber-500":"text-emerald-500"}`,children:a.label})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-1 text-xs",children:[e.jsx(k,{met:r.length,text:"8+ characters"}),e.jsx(k,{met:r.uppercase,text:"Uppercase letter"}),e.jsx(k,{met:r.lowercase,text:"Lowercase letter"}),e.jsx(k,{met:r.number,text:"Number"}),e.jsx(k,{met:r.special,text:"Special character"})]})]}):null},k=({met:t,text:r})=>e.jsxs("div",{className:`flex items-center gap-1.5 ${t?"text-emerald-500":"text-muted-foreground"}`,children:[t?e.jsx(P,{className:"w-3 h-3"}):e.jsx(ie,{className:"w-3 h-3"}),e.jsx("span",{children:r})]}),We=Z({businessName:b().trim().min(2,{message:"Business name is required"}),contactName:b().trim().min(2,{message:"Contact name is required"}),email:b().trim().email({message:"Invalid email address"}),phone:b().trim().optional(),password:b().min(6,{message:"Password must be at least 6 characters"}),confirmPassword:b(),membershipType:je(["free","standard","elite"]),regionsCovered:Ne(b()).min(1,{message:"Please select at least one region"})}).refine(t=>t.password===t.confirmPassword,{message:"Passwords do not match",path:["confirmPassword"]}),Ae=({onSwitchToLogin:t})=>{const r=R(),[a,s]=d.useState(!1),[n,o]=d.useState(""),[i,l]=d.useState(""),[c,L]=d.useState(""),[m,E]=d.useState(""),[N,F]=d.useState(""),[y,Q]=d.useState(""),[g,K]=d.useState("free"),[C,X]=d.useState([]),[x,D]=d.useState({}),ee=async u=>{u.preventDefault(),D({});const q=We.safeParse({businessName:n,contactName:i,email:c,phone:m,password:N,confirmPassword:y,membershipType:g,regionsCovered:C});if(!q.success){const S={};q.error.errors.forEach(p=>{p.path[0]&&(S[p.path[0]]=p.message)}),D(S);return}s(!0);const se=`${window.location.origin}/supplier-dashboard`,{data:Y,error:W}=await j.auth.signUp({email:c,password:N,options:{emailRedirectTo:se,data:{business_name:n,contact_name:i,phone:m,regions_covered:C}}});if(W){W.message.includes("already registered")?(f.error("This email is already registered. Please login instead."),t()):f.error(W.message),s(!1);return}if(Y.user){const{error:S}=await j.functions.invoke("create-supplier-profile",{body:{user_id:Y.user.id,email:c,business_name:n,contact_name:i,phone:m||null,membership_type:g,regi
7ons_covered:C}});if(S)console.error("Profile creation failed:",S),f.error("Registration succeeded but profile setup failed. Please contact support.");else if(j.functions.invoke("send-registration-notification",{body:{type:"supplier",name:i,email:c,businessName:n,membershipType:g,regions:C}}).catch(p=>console.error("Failed to send admin notification:",p)),j.functions.invoke("send-supplier-welcome",{body:{email:c,contactName:i,businessName:n,membershipType:g}}).catch(p=>console.error("Failed to send welcome email:",p)),g==="standard"||g==="elite"){f.success("Registration successful! Redirecting to payment...");try{const p=ye[g],{data:M,error:z}=await j.functions.invoke("create-checkout",{body:{priceId:p.price_id}});if(z)throw z;if(M!=null&&M.url){window.location.href=M.url;return}}catch(p){console.error("Checkout redirect failed:",p),f.error("Payment setup failed. You can upgrade from your dashboard."),r("/supplier-dashboard")}}else f.success("Registration successful! Check your email to confirm your account."),r("/supplier-dashboard")}s(!1)};return e.jsxs("form",{onSubmit:ee,className:"space-y-4",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx(h,{className:"text-base font-semibold",children:"Choose Your Membership"}),e.jsx(Be,{value:g,onChange:K})]}),e.jsxs("div",{className:"space-y-3 border-t pt-4",children:[e.jsxs(h,{className:"text-base font-semibold flex items-center gap-2",children:[e.jsx(U,{className:"w-4 h-4"}),"Regions You Cover *"]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Select all regions where you provide services"}),e.jsx(Re,{selectedRegions:C,onRegionsChange:X,error:x.regionsCovered})]}),e.jsxs("div",{className:"border-t pt-4 space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{htmlFor:"business-name",children:"Business Name *"}),e.jsxs("div",{className:"relative",children:[e.jsx(we,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(v,{id:"business-name",type:"text",placeholder:"Your Business Name",value:n,onChange:u=>o(u.target.value),className:"pl-10"})]}),x.businessName&&e.jsx("p",{className:"text-sm text-destructive",children:x.businessName})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{htmlFor:"contact-name",children:"Contact Name *"}),e.jsxs("div",{className:"relative",children:[e.jsx(le,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(v,{id:"contact-name",type:"text",placeholder:"Your Name",value:i,onChange:u=>l(u.target.value),className:"pl-10"})]}),x.contactName&&e.jsx("p",{className:"text-sm text-destructive",children:x.contactName})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{htmlFor:"register-email",children:"Email *"}),e.jsxs("div",{className:"relative",children:[e.jsx(V,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(v,{id:"register-email",type:"email",placeholder:"[email protected]",value:c,onChange:u=>L(u.target.value),className:"pl-10"})]}),x.email&&e.jsx("p",{className:"text-sm text-destructive",children:x.email})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{htmlFor:"phone",children:"Phone (Optional)"}),e.jsxs("div",{className:"relative",children:[e.jsx(ne,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(v,{id:"phone",type:"tel",placeholder:"+44 1234 567890",value:m,onChange:u=>E(u.target.value),className:"pl-10"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{htmlFor:"register-password",children:"Password *"}),e.jsxs("div",{className:"relative",children:[e.jsx(T,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(v,{id:"register-password",type:"password",placeholder:"••••••••",value:N,onChange:u=>F(u.target.value),className:"pl-10"})]}),e.jsx(Le,{password:N}),x.password&&e.jsx("p",{className:"text-sm text-destructive",children:x.password})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{htmlFor:"confirm-password",children:"Confirm Password *"}),e.jsxs("div",{className:"relative",children:[e.jsx(T,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(v,{id:"confirm-password",type:"password",placeholder:"••••••••",value:y,onChange:u=>Q(u.target.value),className:"pl-10"})]}),x.confirmPassword&&e.jsx("p",{className:"text-sm text-destructive",children:x.confirmPassword})]}),e.jsxs(w,{type:"submit",className:"w-full bg-gold text-secondary hover:bg-gold/90",disabled:a,children:[a&&e.jsx(H,{className:"w-4 h-4 animate-spin mr-2"}),g==="elite"?"Join as Elite Member":g==="standard"?"Join as Standard Member":"Create Free Account"]}),e.jsx("p",{className:"text-xs text-muted-foreground text-center",children:"By registering, you agree to our terms and conditions"})]})]})},Ke=()=>
7{const t=R(),[r]=de(),[a,s]=d.useState("login"),n=r.get("redirect")||"/supplier-dashboard";return d.useEffect(()=>{const{data:{subscription:o}}=j.auth.onAuthStateChange((i,l)=>{l!=null&&l.user&&t(n)});return j.auth.getSession().then(({data:{session:i}})=>{i!=null&&i.user&&t(n)}),()=>o.unsubscribe()},[t,n]),e.jsxs(e.Fragment,{children:[e.jsxs(ce,{children:[e.jsx("title",{children:"Supplier Portal | Elite Weddings & Events"}),e.jsx("meta",{name:"description",content:"Register or login to manage your supplier profile on Elite Weddings & Events."})]}),e.jsx(me,{}),e.jsxs("main",{className:"min-h-screen bg-gradient-to-b from-secondary via-muted to-background",children:[e.jsx("section",{className:"py-20",children:e.jsxs("div",{className:"container mx-auto px-4 max-w-md",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 bg-gold/20 text-gold px-4 py-2 rounded-full mb-4",children:[e.jsx($,{className:"w-5 h-5"}),e.jsx("span",{className:"font-semibold text-sm uppercase tracking-wider",children:"Supplier Portal"})]}),e.jsx("h1",{className:"font-display text-3xl md:text-4xl text-gold mb-3",children:"Manage Your Business"}),e.jsx("p",{className:"text-muted-foreground",children:"Join our elite network of wedding professionals"})]}),e.jsxs(B,{className:"border-gold/20 shadow-lg",children:[e.jsx(ue,{className:"pb-4",children:e.jsxs("div",{className:"grid grid-cols-2 gap-1 bg-muted p-1 rounded-lg",children:[e.jsx("button",{type:"button",onClick:()=>s("login"),className:`px-4 py-2 text-sm font-medium rounded-md transition-colors ${a==="login"?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"}`,children:"Login"}),e.jsx("button",{type:"button",onClick:()=>s("register"),className:`px-4 py-2 text-sm font-medium rounded-md transition-colors ${a==="register"?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"}`,children:"Register"})]})}),e.jsx(I,{children:a==="login"?e.jsx(Fe,{}):e.jsx(Ae,{onSwitchToLogin:()=>s("login")})})]})]})}),e.jsx(Se,{}),e.jsx(ke,{}),e.jsx(Pe,{})]}),e.jsx(xe,{})]})};export{Ke 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.