PageSourceSearch

https://slantapp.ai/assets/PartnerPresaleLanding-d8yNuI2l.js

js slantapp.ai collected 2026-10-05 15:05:46 UTC 8,456 bytes, 1 lines download raw bytes

1import{R as F,u as B,c as L,r as w,W as R,F as D,j as e,C as l,K as d,N as o,aa as j,bZ as g,B as x,O as P,p as M,a as N,am as q,I as U,S as A,U as I,aL as Y,A as O,a4 as S,q as G,Q as K}from"./index-tc5-nNLC.js";import{L as u}from"./label-MwGx_WS4.js";import{T as Q}from"./textarea-DN2rY_yY.js";import{S as W,a as H,b as J,c as V,d as n}from"./select-Bsa-6vNv.js";import{E as $}from"./external-link-wMXh6D17.js";import{G as z}from"./gift-CcGpxH7x.js";import{C as Z}from"./circle-check-B8vEXYAG.js";import{P as X}from"./percent-BsbQn71u.js";import"./index-C-y5wYFI.js";import"./chevron-down-DOFZ7rzv.js";import"./chevron-up-1gTexUQn.js";function oe(){const{partnerId:f,packageId:y}=F(),[,h]=B(),{toast:v}=L(),[T,b]=w.useState(!1),[t,m]=w.useState({businessName:"",businessType:"retail",description:"",contactEmail:""}),{data:r,isLoading:k}=R({queryKey:["/api/merchant-presale/partner",f,"presale",y],enabled:!!f&&!!y}),s=r==null?void 0:r.package,i=r==null?void 0:r.partner,p=D({mutationFn:async a=>(await K("POST",`/api/merchant-presale/presale-packages/${s==null?void 0:s.id}/signup`,a)).json(),onSuccess:a=>{var c;v({title:"Welcome to the Program!",description:a.isNewMerchant?"Your merchant account has been created. Let's set up your first offer!":"You've been enrolled. Let's create your first offer!"}),G.invalidateQueries({queryKey:["/api/merchant-presale/merchants/me"]}),(c=a.enrollment)!=null&&c.id?h(`/merchant/quick-start/${a.enrollment.id}`):h("/merchant/portal")},onError:a=>{v({title:"Signup Failed",description:a.message||"Unable to complete signup. Please try again.",variant:"destructive"})}});if(k)return e.jsx("div",{className:"flex items-center justify-center min-h-screen",children:e.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary"})});if(!s)return e.jsx("div",{className:"container mx-auto py-16 px-4 text-center",children:e.jsxs(l,{className:"max-w-lg mx-auto",children:[e.jsxs(d,{children:[e.jsx(o,{children:"Presale Program Not Found"}),e.jsx(j,{children:"This partner presale program doesn't exist, or it may have expired."})]}),e.jsx(g,{className:"justify-center",children:e.jsx(x,{onClick:()=>h("/"),"data-testid":"btn-return-home",children:"Return Home"})})]})});const C=s.maxMerchants?s.maxMerchants-(s.enrolledMerchants||0):null,E=s.featuredBenefits||["Exclusive access to partner-driven promotions","Reach highly engaged customers","Automated tracking and analytics","Commission-based model - pay only for results"];return e.jsx("div",{className:"min-h-screen bg-gradient-to-b from-background to-muted",children:e.jsx("div",{className:"container mx-auto py-12 px-4",children:e.jsxs("div",{className:"max-w-4xl mx-auto",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsxs("div",{className:"flex items-center justify-center gap-2 mb-4",children:[e.jsxs(P,{variant:"secondary","data-testid":"badge-partner",children:[e.jsx(M,{className:"w-3 h-3 mr-1"}),"Partner Campaign"]}),i&&e.jsxs(P,{variant:"outline","data-testid":"badge-partner-name",children:[e.jsx($,{className:"w-3 h-3 mr-1"}),"via ",i.displayName]})]}),s.partnerBrandingUrl&&e.jsx("img",{src:s.partnerBrandingUrl,alt:(i==null?void 0:i.displayName)||"Partner",className:"h-16 mx-auto mb-4 object-contain","data-testid":"img-partner-branding"}),e.jsx("h1",{className:"text-4xl font-bold mb-4","data-testid":"text-package-name",children:s.name}),s.externalCampaignName&&e.jsxs("p",{className:"text-xl text-muted-foreground mb-2",children:["Campaign: ",e.jsx("span",{className:"font-semibold text-foreground",children:s.externalCampaignName})]}),s.description&&e.jsx("p",{className:"text-lg text-muted-foreground max-w-2xl mx-auto",children:s.description})]}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-8 mb-12",children:[e.jsxs(l,{children:[e.jsx(d,{children:e.jsxs(o,{className:"flex items-center gap-2",children:[e.jsx(z,{className:"w-5 h-5 text-primary"}),"What You Get"]})}),e.jsx(N,{children:e.jsx("ul",{className:"space-y-3",children:E.map((a,c)=>e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx(Z,{className:"w-5 h-5 text-green-500 flex-shrink-0 mt-0.5"}),e.jsx("span",{children:a})]},c))})})]}),e.jsxs(l,{children:[e.jsx(d,{children:e.jsxs(o,{className:"flex items-center gap-2",children:[e.jsx(q,{className:"w-5 h-5 text-primary"}),"Program Details"]}
1)}),e.jsx(N,{children:e.jsxs("div",{className:"space-y-4",children:[s.trialDays&&s.trialDays>0&&e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(U,{className:"w-5 h-5 text-muted-foreground"}),e.jsxs("div",{children:[e.jsxs("p",{className:"font-medium",children:[s.trialDays,"-Day Free Trial"]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Try before you commit"})]})]}),s.discountPercent&&s.discountPercent>0&&e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(X,{className:"w-5 h-5 text-muted-foreground"}),e.jsxs("div",{children:[e.jsxs("p",{className:"font-medium",children:[s.discountPercent,"% Launch Discount"]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Exclusive for early adopters"})]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(A,{className:"w-5 h-5 text-muted-foreground"}),e.jsxs("div",{children:[e.jsxs("p",{className:"font-medium",children:[s.athleteCommissionPercent||"10","% Partner Commission"]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Fair split with partners"})]})]}),C!==null&&e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(I,{className:"w-5 h-5 text-muted-foreground"}),e.jsxs("div",{children:[e.jsxs("p",{className:"font-medium",children:[C," Spots Remaining"]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Limited availability"})]})]})]})})]})]}),T?e.jsxs(l,{className:"max-w-xl mx-auto",children:[e.jsxs(d,{children:[e.jsx(o,{children:"Create Your Merchant Account"}),e.jsx(j,{children:"Fill in your business details to join the partner presale program."})]}),e.jsx(N,{children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(u,{htmlFor:"businessName",children:"Business Name *"}),e.jsx(S,{id:"businessName",value:t.businessName,onChange:a=>m({...t,businessName:a.target.value}),placeholder:"Your Business Name","data-testid":"input-business-name"})]}),e.jsxs("div",{children:[e.jsx(u,{htmlFor:"contactEmail",children:"Contact Email *"}),e.jsx(S,{id:"contactEmail",type:"email",value:t.contactEmail,onChange:a=>m({...t,contactEmail:a.target.value}),placeholder:"[email protected]","data-testid":"input-contact-email"})]}),e.jsxs("div",{children:[e.jsx(u,{htmlFor:"businessType",children:"Business Type"}),e.jsxs(W,{value:t.businessType,onValueChange:a=>m({...t,businessType:a}),children:[e.jsx(H,{"data-testid":"select-business-type",children:e.jsx(J,{placeholder:"Select type"})}),e.jsxs(V,{children:[e.jsx(n,{value:"retail",children:"Retail"}),e.jsx(n,{value:"restaurant",children:"Restaurant"}),e.jsx(n,{value:"service",children:"Service"}),e.jsx(n,{value:"entertainment",children:"Entertainment"}),e.jsx(n,{value:"sports",children:"Sports"}),e.jsx(n,{value:"other",children:"Other"})]})]})]}),e.jsxs("div",{children:[e.jsx(u,{htmlFor:"description",children:"Business Description (Optional)"}),e.jsx(Q,{id:"description",value:t.description,onChange:a=>m({...t,description:a.target.value}),placeholder:"Tell us about your business...","data-testid":"input-description"})]})]})}),e.jsxs(g,{className:"flex gap-2",children:[e.jsx(x,{variant:"outline",onClick:()=>b(!1),"data-testid":"btn-cancel",children:"Back"}),e.jsx(x,{className:"flex-1",onClick:()=>p.mutate(t),disabled:!t.businessName||!t.contactEmail||p.isPending,"data-testid":"btn-complete-signup",children:p.isPending?"Creating Account...":"Complete Signup"})]})]}):e.jsxs(l,{className:"max-w-xl mx-auto",children:[e.jsxs(d,{className:"text-center",children:[e.jsx(Y,{className:"w-12 h-12 mx-auto mb-4 text-primary"}),e.jsx(o,{children:"Ready to Join?"}),e.jsx(j,{children:"Create your merchant account and start reaching new customers through this partner campaign."})]}),e.jsx(g,{className:"justify-center",children:e.jsxs(x,{size:"lg",onClick:()=>b(!0),"data-testid":"btn-start-signup",children:[s.ctaText||"Join Partner Program",e.jsx(O,{className:"w-4 h-4 ml-2"})]})})]}),e.jsx("p",{className:"text-center text-sm text-muted-foreground mt-8",children:"By signing up, you agree to our Terms of Service and Privacy Policy."})]})})})}export{oe 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.