PageSourceSearch

https://myelite.app/assets/ServicePricingManager-DdXUYIjF.js

js myelite.app collected 2026-10-09 22:04:48 UTC 23,845 bytes, 1 lines download raw bytes

1import{a as U,j as e,b as ee}from"./vendor-query-MRsttINt.js";import{r as N}from"./vendor-react-Bap2YrL4.js";import{bf as re,db as ne,aD as V,b6 as te,b7 as ie,aI as d,aO as ae,b8 as le,b9 as ce,ba as oe,bb as x,aG as T,aU as de,aV as me,aW as pe,aX as xe,aY as A,aw as ue,ct as M,ch as he,dN as ge,aZ as be,cq as L,g5 as fe,bk as je,cd as _e,aT as Ne,bl as ye,bm as ve,bn as ke,bo as we,bp as Te,bq as Ce,br as Pe,at as R,aF as h,d6 as Se,d7 as qe,d8 as H,e1 as G,aS as Y,a_ as W}from"./index-CQjtNSF2.js";import{u as se,a as Ae}from"./usePTMemberships-C2CU3CRe.js";import{g as X,u as Me}from"./useClubMembershipTypes-BlXVdleI.js";import{T as Z,a as $,b as S,c as u,d as J,e as l}from"./table-DhUVpEIi.js";import{d as Re}from"./useBookableResources-CH_Pegs8.js";import{a as Fe}from"./useGroupClasses-BRJqx-fw.js";import{u as De}from"./useMemberships-V2AMZ_cj.js";function Ge(){const[c,i]=N.useState(!1),[m,g]=N.useState(null),{data:o,isLoading:F}=se(),C=Ae(),y=re(),v=U(),{register:p,handleSubmit:q,reset:P,watch:b,setValue:t,formState:{errors:f}}=ne({defaultValues:{includes_class_access:!0,includes_resource_access:!0,allows_external_billing:!0,billing_preset:"monthly",custom_months:1}}),D=b("includes_class_access"),E=b("includes_resource_access"),B=b("allows_external_billing"),k=b("billing_preset"),_=b("custom_months"),j=(r,n)=>{switch(r){case"monthly":return 1;case"quarterly":return 3;case"biannually":return 6;case"annually":return 12;case"custom":return n||1}},Q=r=>{const n=r.billing_interval_count||1;return n===1?"monthly":n===3?"quarterly":n===6?"biannually":n===12?"annually":"custom"},z=async r=>{const n=j(r.billing_preset,r.custom_months),s=r.billing_preset==="custom"?"custom":r.billing_preset;if(m){const{error:a}=await R.from("pt_membership_tiers").update({name:r.name,monthly_price:r.monthly_price,sessions_per_month:r.sessions_per_month,overflow_session_price:r.overflow_session_price||null,description:r.description,includes_class_access:r.includes_class_access,includes_resource_access:r.includes_resource_access,allows_external_billing:r.allows_external_billing,billing_interval:s,billing_interval_count:n}).eq("id",m.id);if(a){h.error("Failed to update tier");return}h.success("Tier updated"),v.invalidateQueries({queryKey:["pt-membership-tiers"]}),g(null),i(!1),P()}else C.mutate({name:r.name,monthly_price:r.monthly_price,sessions_per_month:r.sessions_per_month,overflow_session_price:r.overflow_session_price,description:r.description,allows_external_billing:r.allows_external_billing,billing_interval:s,billing_interval_count:n},{onSuccess:()=>{i(!1),P()}})},w=r=>{g(r),t("name",r.name),t("monthly_price",r.monthly_price),t("sessions_per_month",r.sessions_per_month),t("overflow_session_price",r.overflow_session_price||void 0),t("description",r.description||""),t("includes_class_access",r.includes_class_access),t("includes_resource_access",r.includes_resource_access),t("allows_external_billing",r.allows_external_billing??!0);const n=Q(r);t("billing_preset",n),n==="custom"&&t("custom_months",r.billing_interval_count||1),i(!0)},I=async r=>{const{error:n}=await R.from("pt_membership_tiers").update({is_active:!1}).eq("id",r.id);if(n){h.error("Failed to hide tier");return}
1h.success("Tier hidden from customers"),v.invalidateQueries({queryKey:["pt-membership-tiers"]})},O=async r=>{const{error:n}=await R.from("pt_membership_tiers").delete().eq("id",r.id);if(n){h.error("Failed to delete tier");return}h.success("Tier deleted"),v.invalidateQueries({queryKey:["pt-membership-tiers"]})},K=r=>{i(r),r||(g(null),P())};return F?e.jsx("div",{className:"flex items-center justify-center p-6",children:e.jsx(V,{className:"h-6 w-6 animate-spin text-primary"})}):e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-end justify-between gap-4 border-b border-foreground/15 pb-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"t-eyebrow text-foreground",children:"PT Membership Tiers"}),e.jsx("h3",{className:"font-display font-light text-[22px] leading-none tracking-tight mt-1",children:"Personal Training Membership Tiers"})]}),y&&e.jsxs(te,{open:c,onOpenChange:K,children:[e.jsx(ie,{asChild:!0,children:e.jsxs(d,{size:"sm",variant:"outline",className:"rounded-none border-foreground
1/25 font-btn text-[11px] uppercase tracking-[0.2em]",children:[e.jsx(ae,{className:"h-3.5 w-3.5 mr-2"}),"Add Tier"]})}),e.jsxs(le,{children:[e.jsx(ce,{children:e.jsx(oe,{children:m?"Edit Personal Training Tier":"Create Personal Training Tier"})}),e.jsxs("form",{onSubmit:q(z),className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(x,{htmlFor:"name",children:"Tier Name"}),e.jsx(T,{id:"name",placeholder:"e.g., Black, Gold, Silver",...p("name",{required:"Name is required"})}),f.name&&e.jsx("p",{className:"text-xs text-destructive",children:f.name.message})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(x,{htmlFor:"monthly_price",children:"Price (€)"}),e.jsx(T,{id:"monthly_price",type:"number",step:"0.01",placeholder:"299",...p("monthly_price",{required:"Price is required",valueAsNumber:!0,min:{value:0,message:"Must be positive"}})}),f.monthly_price&&e.jsx("p",{className:"text-xs text-destructive",children:f.monthly_price.message})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(x,{htmlFor:"sessions_per_month",children:"Sessions/Period"}),e.jsx(T,{id:"sessions_per_month",type:"number",placeholder:"10",...p("sessions_per_month",{required:"Required",valueAsNumber:!0,min:{value:1,message:"At least 1"}})}),f.sessions_per_month&&e.jsx("p",{className:"text-xs text-destructive",children:f.sessions_per_month.message})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(x,{htmlFor:"overflow_session_price",children:"Overflow Session Price (€)"}),e.jsx(T,{id:"overflow_session_price",type:"number",step:"0.01",placeholder:"e.g., 165",...p("overflow_session_price",{valueAsNumber:!0,min:{value:0,message:"Must be positive"}})}),e.jsx("p",{className:"text-xs text-foreground",children:"Price charged when client exceeds included sessions. Leave empty to disable overflow."})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(x,{children:"Billing Cycle"}),e.jsxs(de,{value:k,onValueChange:r=>t("billing_preset",r),children:[e.jsx(me,{children:e.jsx(pe,{})}),e.jsxs(xe,{children:[e.jsx(A,{value:"monthly",children:"Monthly"}),e.jsx(A,{value:"quarterly",children:"Quarterly (3 months)"}),e.jsx(A,{value:"biannually",children:"Biannually (6 months)"}),e.jsx(A,{value:"annually",children:"Annually (12 months)"}),e.jsx(A,{value:"custom",children:"Custom..."})]})]})]}),k==="custom"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(x,{htmlFor:"custom_months",children:"Number of Months"}),e.jsx(T,{id:"custom_months",type:"number",min:1,max:24,placeholder:"e.g., 4",...p("custom_months",{valueAsNumber:!0,min:{value:1,message:"At least 1 month"},max:{value:24,message:"Max 24 months"}})})]})]}),k!=="monthly"&&e.jsxs("p",{className:"text-xs text-foreground",children:["≈ €",(b("monthly_price")/j(k,_)).toFixed(2),"/month equivalent"]}),e.jsxs("div",{className:"space-y-3 rounded-lg border p-4",children:[e.jsx("h4",{className:"font-medium text-sm",children:"Included Access"}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ue,{className:"h-4 w-4 text-foreground"}),e.jsx(x,{htmlFor:"includes_class_access",className:"font-normal",children:"Unlimited Class Access"})]}),e.jsx(M,{id:"includes_class_access",checked:D,onCheckedChange:r=>t("includes_class_access",r)})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(he,{className:"h-4 w-4 text-foreground"}),e.jsx(x,{htmlFor:"includes_resource_access",className:"font-normal",children:"Resource Booking Access"})]}),e.jsx(M,{id:"includes_resource_access",checked:E,onCheckedChange:r=>t("includes_resource_access",r)})]})]}),e.jsxs("div",{className:"space-y-3 rounded-lg border p-4",children:[e.jsx("h4",{className:"font-medium text-sm",children:"Billing Options"}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ge,{className:"h-4 w-4 text-foreground"}),e.jsxs("div",{children:[e.jsx(x,{htmlFor:"allows_external_billing",className:"font-normal",children:"Allow External Invoicing"}),e.jsx("p",{className:"text-xs text-foreground",children:"Enable for clients billed outside the platform"})]})]}),e.jsx(M,{id:"allows_external_billing",checked:B,onCheckedChange:r=>t("allows_external_billing",r)})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(x,{htmlFor:"description",children:"Description (optional)"}),e.jsx(be,{id:"description",placeholder:"Premium membership with priority booking...",...p("description")})]}),e.jsxs(d,{type:"submit",className:"w-full",disabled:C.isPending,children:[C.isPending&&e.jsx(V,{className:"h-4 w-4 mr-2 animate-spin"}),m?"Update Tier":"Create Tier"]})]})]})]})]}),o&&o.length>0?e.jsx("div",{className:"space-y-3",children:o.map(r=>
1e.jsxs("div",{className:"rounded-none border border-foreground/15 bg-background p-4",children:[e.jsxs("div",{className:"flex items-start justify-between mb-2",children:[e.jsxs("div",{children:[e.jsx("p",{className:"t-eyebrow",children:"PT Membership Tier"}),e.jsxs("h4",{className:"font-display font-light text-[22px] leading-tight flex items-center gap-3",children:[r.name,e.jsxs("span",{className:"font-btn text-[10px] uppercase tracking-[0.18em] border border-foreground/20 px-2 py-0.5",children:[r.sessions_per_month," sessions / ",X(r.billing_interval||"monthly",r.billing_interval_count||1)]})]}),e.jsxs("p",{className:"font-display font-light text-[26px] leading-none mt-1",children:["€",r.monthly_price,e.jsxs("span",{className:"font-btn text-[11px] uppercase tracking-[0.18em] text-foreground ml-2",children:["/ ",X(r.billing_interval||"monthly",r.billing_interval_count||1)]})]}),r.overflow_session_price&&e.jsxs("p",{className:"font-btn text-[10px] uppercase tracking-[0.18em] text-foreground mt-1",children:["Overflow · €",r.overflow_session_price," / session"]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[r.is_active&&e.jsx("span",{className:"font-btn text-[10px] uppercase tracking-[0.2em] bg-foreground text-background px-2.5 py-1",children:"Active"}),y&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(d,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>w(r),children:e.jsx(L,{className:"h-4 w-4"})}),e.jsx(d,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>I(r),children:e.jsx(fe,{className:"h-4 w-4"})}),e.jsxs(je,{children:[e.jsx(_e,{asChild:!0,children:e.jsx(d,{variant:"ghost",size:"icon",className:"h-8 w-8 text-destructive",children:e.jsx(Ne,{className:"h-4 w-4"})})}),e.jsxs(ye,{children:[e.jsxs(ve,{children:[e.jsx(ke,{children:"Delete Tier?"}),e.jsxs(we,{children:['This will permanently delete the "',r.name,'" tier. This action cannot be undone.']})]}),e.jsxs(Te,{children:[e.jsx(Ce,{children:"Cancel"}),e.jsx(Pe,{onClick:()=>O(r),children:"Delete"})]})]})]})]})]})]}),e.jsxs("div",{className:"flex flex-wrap gap-2 mb-2",children:[r.includes_class_access&&e.jsx("span",{className:"font-btn text-[10px] uppercase tracking-[0.18em] border border-foreground
1/20 px-2 py-0.5 text-foreground",children:"Unlimited Classes"}),r.includes_resource_access&&e.jsx("span",{className:"font-btn text-[10px] uppercase tracking-[0.18em] border border-foreground/20 px-2 py-0.5 text-foreground",children:"Resource Booking"}),r.allows_external_billing&&e.jsx("span",{className:"font-btn text-[10px] uppercase tracking-[0.18em] border border-foreground/20 px-2 py-0.5 text-foreground",children:"External Invoicing"})]}),r.description&&e.jsx("p",{className:"font-serif italic text-[13px] text-foreground",children:r.description})]},r.id))}):e.jsxs("div",{className:"border border-foreground/15 py-10 text-center",children:[e.jsx("p",{className:"font-display font-light text-[18px] tracking-tight",children:"No membership tiers created yet"}),y&&e.jsx("p",{className:"font-serif italic text-[13px] text-foreground mt-1",children:'Click "Add Tier" to create one'})]})]})}function Ee(){const c=U();return ee({mutationFn:async({id:i,pricePerBooking:m,requiresMembership:g})=>{const{error:o}=await R.from("bookable_resources").update({price_per_booking:m,requires_membership:g}).eq("id",i);if(o)throw o},onSuccess:()=>{c.invalidateQueries({queryKey:["bookable-resources"]}),c.invalidateQueries({queryKey:["resource-pricing"]}),h.success("Facility pricing updated")},onError:i=>{h.error("Failed to update pricing: "+i.message)}})}function Be(){const c=U();return ee({mutationFn:async({id:i,dropInPrice:m,requiresMembership:g})=>{const{error:o}=await R.from("group_classes").update({drop_in_price:m,requires_membership:g}).eq("id",i);if(o)throw o},onSuccess:()=>{c.invalidateQueries({queryKey:["group-classes"]}),c.invalidateQueries({queryKey:["group-class-pricing"]}),h.success("Class pricing updated")},onError:i=>{h.error("Failed to update pricing: "+i.message)}})}function Ye(){const{data:c}=Re(),{data:i}=Fe(),{data:m}=De(),{data:g}=se(),{data:o}=Me(),F=Ee(),C=Be(),[y,v]=N.useState(null),[p,q]=N.useState(null),[P,b]=N.useState(0),[t,f]=N.useState(!1),[D,E]=N.useState(0),[B,k]=N.useState(!1),_=s=>`€${s.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:0})}`,j=m?.map(s=>({name:s.name,sessions:s.session_count,price:s.price_amount,perSession:s.price_amount/s.session_count})).sort((s,a)=>a.sessions-s.sessions)||[],Q=j.length>0?j.reduce((s,a)=>s+a.perSession,0)/j.length:50,z=o?.[0]?.monthly_price||0,w=g?.map(s=>{const a=s.monthly_price-z;return{name:s.name,sessions:s.sessions_per_month,monthlyPrice:s.monthly_price,ptOnlyPrice:a,perSession:a/s.sessions_per_month}}).sort((s,a)=>a.sessions-s.sessions)||[],I=w.length>0?w.reduce((s,a)=>s+a.perSession,0)/w.length:null,O=s=>{v(s.id),b(Number(s.price_per_booking)||0),f(s.requires_membership||!1)},K=async s=>{await F.mutateAsync({id:s,pricePerBooking:P,requiresMembership:t}),v(null)},r=s=>{q(s.id),E(Number(s.drop_in_price)||0),k(s.requires_membership||!1)},n=async s=>{await C.mutateAsync({id:s,dropInPrice:D,requiresMembership:B}),q(null)};return e.jsxs("div",{className:"space-y-6",children:[w.length>0&&e.jsxs("div",{className:"rounded-none border border-foreground
1/15 bg-background",children:[e.jsxs("div",{className:"p-4 border-b border-foreground/10",children:[e.jsx("p",{className:"t-eyebrow",children:"Comparison"}),e.jsx("h3",{className:"font-display font-light text-[22px] leading-tight",children:"PT Membership Rates"}),e.jsxs("p",{className:"font-serif italic text-[13px] text-foreground",children:["Per-session cost based on monthly PT memberships (excluding €",z," club membership)"]})]}),e.jsxs("div",{className:"p-4",children:[e.jsx("div",{className:"flex flex-wrap gap-3",children:w.map(s=>e.jsxs("div",{className:"flex items-baseline gap-3 px-3 py-2 rounded-none border border-foreground/15 bg-background",children:[e.jsx("span",{className:"font-btn text-[11px] uppercase tracking-[0.16em]",children:s.name}),e.jsxs("span",{className:"font-display font-light text-[20px] leading-none",children:[_(s.perSession),e.jsx("span",{className:"font-btn text-[10px] uppercase tracking-[0.16em] text-foreground ml-1",children:"/ session"})]}),e.jsxs("span",{className:"font-btn text-[10px] uppercase tracking-[0.16em] text-foreground",children:[s.sessions," sessions/mo"]})]},s.name))}),I!==null&&e.jsxs("p",{className:"font-serif italic text-[13px] text-foreground mt-3",children:["Average PT membership rate: ",e.jsx("span",{className:"font-display not-italic font-light text-[16px] text-foreground",children:_(I)})," / session."]})]})]}),e.jsxs("div",{className:"rounded-none border border-foreground
1/15 bg-background",children:[e.jsxs("div",{className:"p-4 border-b border-foreground/10",children:[e.jsx("p",{className:"t-eyebrow",children:"Comparison"}),e.jsx("h3",{className:"font-display font-light text-[22px] leading-tight",children:"Personal Training Package Rates"}),e.jsx("p",{className:"font-serif italic text-[13px] text-foreground",children:"Set drop-in prices higher than package rates to incentivize package purchases"})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex flex-wrap gap-3",children:[j.map(s=>e.jsxs("div",{className:"flex items-baseline gap-3 px-3 py-2 rounded-none border border-foreground/15 bg-background",children:[e.jsx("span",{className:"font-btn text-[11px] uppercase tracking-[0.16em]",children:s.name}),e.jsxs("span",{className:"font-display font-light text-[20px] leading-none",children:[_(s.perSession),e.jsx("span",{className:"font-btn text-[10px] uppercase tracking-[0.16em] text-foreground ml-1",children:"/ session"})]})]},s.name)),j.length===0&&e.jsx("p",{className:"font-serif italic text-[13px] text-foreground",children:"No personal training packages defined yet"})]}),j.length>0&&e.jsxs("p",{className:"font-serif italic text-[13px] text-foreground mt-3",children:["Average package rate: ",e.jsx("span",{className:"font-display not-italic font-light text-[16px] text-foreground",children:_(Q)})," / session. Consider setting drop-in prices 20–50% higher."]})]})]}),e.jsxs(Se,{defaultValue:"resources",className:"space-y-4",children:[e.jsxs(qe,{className:"rounded-none bg-transparent p-0 h-auto border-b border-foreground
1/15 w-full justify-start gap-6",children:[e.jsx(H,{value:"resources",className:"rounded-none bg-transparent shadow-none border-b-2 border-transparent data-[state=active]:border-foreground data-[state=active]:bg-transparent px-0 pb-2 font-btn text-[12px] uppercase tracking-[0.18em] text-foreground data-[state=active]:text-foreground",children:"Resources"}),e.jsx(H,{value:"classes",className:"rounded-none bg-transparent shadow-none border-b-2 border-transparent data-[state=active]:border-foreground data-[state=active]:bg-transparent px-0 pb-2 font-btn text-[12px] uppercase tracking-[0.18em] text-foreground data-[state=active]:text-foreground",children:"Club Classes"})]}),e.jsx(G,{value:"resources",children:e.jsxs("div",{className:"rounded-none border border-foreground/15 bg-background",children:[e.jsxs("div",{className:"p-4 border-b border-foreground/10",children:[e.jsx("h3",{className:"font-display font-light text-[22px] leading-tight",children:"Resource Pricing"}),e.jsx("p",{className:"font-serif italic text-[13px] text-foreground",children:"Set pay-per-use prices for bookable resources (sauna, lounge, etc.)"})]}),e.jsx("div",{className:"p-4",children:e.jsxs(Z,{children:[e.jsx($,{children:e.jsxs(S,{className:"border-foreground
1/15 hover:bg-transparent",children:[e.jsx(u,{className:"font-btn text-[10px] uppercase tracking-[0.18em]",children:"Resource"}),e.jsx(u,{className:"font-btn text-[10px] uppercase tracking-[0.18em]",children:"Type"}),e.jsx(u,{className:"text-right font-btn text-[10px] uppercase tracking-[0.18em]",children:"Drop-in Price"}),e.jsx(u,{className:"font-btn text-[10px] uppercase tracking-[0.18em]",children:"Requires Membership"}),e.jsx(u,{className:"text-right font-btn text-[10px] uppercase tracking-[0.18em]",children:"Actions"})]})}),e.jsxs(J,{children:[c?.map(s=>e.jsxs(S,{children:[e.jsx(l,{className:"font-display font-light text-[16px]",children:s.name}),e.jsx(l,{children:e.jsx("span",{className:"font-btn text-[10px] uppercase tracking-[0.16em] px-2 py-0.5 border border-foreground/25 text-foreground",children:s.resource_type.replace("_"," ")})}),e.jsx(l,{className:"text-right",children:y===s.id?e.jsx(T,{type:"number",value:P,onChange:a=>b(Number(a.target.value)),className:"w-24 ml-auto",min:0,step:5}):e.jsx("span",{className:Number(s.price_per_booking)>0?"font-display font-light text-[18px]":"font-btn text-[11px] uppercase tracking-[0.16em] text-foreground",children:Number(s.price_per_booking)>0?_(Number(s.price_per_booking)):"Free"})}),e.jsx(l,{children:y===s.id?e.jsx(M,{checked:t,onCheckedChange:f}):e.jsx("span",{className:s.requires_membership?"font-btn text-[10px] uppercase tracking-[0.16em] px-2 py-0.5 bg-foreground text-background":"font-btn text-[10px] uppercase tracking-[0.16em] px-2 py-0.5 border border-foreground
1/25 text-foreground",children:s.requires_membership?"Yes":"No"})}),e.jsx(l,{className:"text-right",children:y===s.id?e.jsxs("div",{className:"flex gap-2 justify-end",children:[e.jsx(d,{size:"sm",onClick:()=>K(s.id),disabled:F.isPending,children:e.jsx(Y,{className:"h-4 w-4"})}),e.jsx(d,{size:"sm",variant:"outline",onClick:()=>v(null),children:e.jsx(W,{className:"h-4 w-4"})})]}):e.jsx(d,{size:"sm",variant:"ghost",onClick:()=>O(s),children:e.jsx(L,{className:"h-4 w-4"})})})]},s.id)),(!c||c.length===0)&&e.jsx(S,{children:e.jsx(l,{colSpan:5,className:"text-center font-serif italic text-[13px] text-foreground py-8",children:"No bookable resources defined"})})]})]})})]})}),e.jsx(G,{value:"classes",children:e.jsxs("div",{className:"rounded-none border border-foreground/15 bg-background",children:[e.jsxs("div",{className:"p-4 border-b border-foreground/10",children:[e.jsx("h3",{className:"font-display font-light text-[22px] leading-tight",children:"Club Class Pricing"}),e.jsx("p",{className:"font-serif italic text-[13px] text-foreground",children:"Set drop-in prices for non-members attending group classes"})]}),e.jsx("div",{className:"p-4",children:e.jsxs(Z,{children:[e.jsx($,{children:e.jsxs(S,{className:"border-foreground
1/15 hover:bg-transparent",children:[e.jsx(u,{className:"font-btn text-[10px] uppercase tracking-[0.18em]",children:"Class"}),e.jsx(u,{className:"font-btn text-[10px] uppercase tracking-[0.18em]",children:"Schedule"}),e.jsx(u,{className:"text-right font-btn text-[10px] uppercase tracking-[0.18em]",children:"Drop-in Price"}),e.jsx(u,{className:"font-btn text-[10px] uppercase tracking-[0.18em]",children:"Members Only"}),e.jsx(u,{className:"text-right font-btn text-[10px] uppercase tracking-[0.18em]",children:"Actions"})]})}),e.jsxs(J,{children:[i?.map(s=>e.jsxs(S,{children:[e.jsx(l,{className:"font-display font-light text-[16px]",children:s.name}),e.jsx(l,{children:e.jsxs("span",{className:"font-btn text-[11px] uppercase tracking-[0.16em] text-foreground",children:[["Sun","Mon","Tue","Wed","Thu","Fri","Sat"][s.day_of_week]," ",s.start_time.slice(0,5)]})}),e.jsx(l,{className:"text-right",children:p===s.id?e.jsx(T,{type:"number",value:D,onChange:a=>E(Number(a.target.value)),className:"w-24 ml-auto",min:0,step:5}):e.jsx("span",{className:Number(s.drop_in_price)>0?"font-display font-light text-[18px]":"font-btn text-[11px] uppercase tracking-[0.16em] text-foreground",children:Number(s.drop_in_price)>0?_(Number(s.drop_in_price)):"Free"})}),e.jsx(l,{children:p===s.id?e.jsx(M,{checked:B,onCheckedChange:k}):e.jsx("span",{className:s.requires_membership?"font-btn text-[10px] uppercase tracking-[0.16em] px-2 py-0.5 bg-foreground text-background":"font-btn text-[10px] uppercase tracking-[0.16em] px-2 py-0.5 border border-foreground
1/25 text-foreground",children:s.requires_membership?"Yes":"No"})}),e.jsx(l,{className:"text-right",children:p===s.id?e.jsxs("div",{className:"flex gap-2 justify-end",children:[e.jsx(d,{size:"sm",onClick:()=>n(s.id),disabled:C.isPending,children:e.jsx(Y,{className:"h-4 w-4"})}),e.jsx(d,{size:"sm",variant:"outline",onClick:()=>q(null),children:e.jsx(W,{className:"h-4 w-4"})})]}):e.jsx(d,{size:"sm",variant:"ghost",onClick:()=>r(s),children:e.jsx(L,{className:"h-4 w-4"})})})]},s.id)),(!i||i.length===0)&&e.jsx(S,{children:e.jsx(l,{colSpan:5,className:"text-center font-serif italic text-[13px] text-foreground py-8",children:"No group classes defined"})})]})]})})]})})]})]})}export{Ge as P,Ye as S};

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.