(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,973740,438198,e=>{"use strict";var s=e.i(843476),i=e.i(271645),t=e.i(655607);e.s(["Price",0,({number:e,customCurrency:a})=>{var r;let[l,n]=(0,i.useState)(!1),{currency:d}=(0,t.useSettings)(),c=a||d,o=Math.round(Number(e)||0).toLocaleString("en-US"),m=(r=c?.symbol)&&"$"!==r&&"usd"!==r.toLowerCase()?r:"تومان";return((0,i.useEffect)(()=>{n(!0)},[]),l)?c?.position==="before"?(0,s.jsxs)(s.Fragment,{children:[m," ",o]}):(0,s.jsxs)(s.Fragment,{children:[o," ",m]}):null}],438198),e.s([],973740)},885338,e=>{"use strict";var s=e.i(843476);e.i(785269);var i=e.i(322831);e.i(973740);var t=e.i(438198),a=e.i(877193);e.i(875602);var r=e.i(986282),l=e.i(298504);e.i(720675);var n=e.i(193712),d=e.i(770703);e.i(253398);var c=e.i(254697),o=e.i(650483);let m=(0,d.default)(()=>e.A(519547).then(e=>({default:e.MembershipPayment})),{loadableGenerated:{modules:[991673]},loading:()=>(0,s.jsx)(c.LoadingCard,{})});e.s(["MembershipDetail",0,({data:e,showPayButton:d=!0})=>{let{t:c}=(0,i.useTranslation)(),x=(0,a.default)(e=>e.user),[u,p,h]=(0,l.useModal)();return(0,s.jsxs)("div",{className:"pt-16 pb-5 sm:px-12 sm:pt-20 sm:pb-16 px-4",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,s.jsx)("strong",{className:"text-2xl font-semibold",children:e?.translation?.title}),(0,s.jsx)("strong",{className:"text-xl font-semibold",children:(0,s.jsx)(t.Price,{number:e?.price})})]}),(0,s.jsx)("p",{className:"text-sm mb-3",children:e?.translation?.description}),(0,s.jsxs)("div",{className:"flex items-center gap-2.5 flex-wrap mb-3",children:[(0,s.jsx)("div",{className:"border border-gray-field rounded-full py-2 px-5",children:(0,s.jsx)("span",{className:"text-base text-gray-field",children:(0,o.formatDuration)(e?.time,c)})}),(0,s.jsx)("div",{className:"border border-gray-field rounded-full py-2 px-5",children:e?.sessions===1?(0,s.jsxs)("span",{className:"text-base text-gray-field",children:[`${e?.sessions_count} / ${e?.remainderSessions}`," ",c("count")]}):(0,s.jsx)("span",{className:"text-base text-gray-field",children:c("unlimited")})})]}),(0,s.jsx)("p",{className:"text-sm ",children:e?.translation?.term}),(0,s.jsxs)("p",{className:"mt-3",children:[c("services"),":"," ",e?.services.map(e=>e.service?.translation?.title||"").join(", ")]}),x&&d&&(0,s.jsx)("div",{className:"mt-6",children:(0,s.jsx)(r.Button,{fullWidth:!0,onClick:p,children:c("buy.now")})}),(0,s.jsx)(n.Modal,{isOpen:u,onClose:h,withCloseButton:!0,children:(0,s.jsx)(m,{membershipId:e?.id,totalPrice:e?.price,onPaymentSuccess:h})})]})}])},916948,e=>{e.n(e.i(885338))},519547,e=>{e.v(s=>Promise.all(["static/chunks/b14d14277a97f4e4.js"].map(s=>e.l(s))).then(()=>s(991673)))}]);