"use strict";exports.id=2449,exports.ids=[2449],exports.modules={70574:(e,a,r)=>{r.a(e,async(e,t)=>{try{r.d(a,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var s=r(20997),l=r(60802),d=r(11377),x=r(92132),n=r(64515),c=r(16974),i=r(30184),m=r(21587),o=r(89699),p=r.n(o),h=r(99930),f=r(59003),b=r.n(f),_=r(81697),g=r(45009),k=e([c,i,m,h]);[c,i,m,h]=k.then?(await k)():k;let u="h-11 w-full appearance-none dark:bg-dark-250 rounded border-[1px] bg-white border-light-500 px-4 py-2 text-13px text-dark ring-[0.5px] ring-light-500 focus:border-brand focus:ring-[0.5px] focus:ring-brand dark:border-dark-600 dark:text-light dark:ring-dark-600 dark:focus:border-brand dark:focus:border-[1px] dark:focus:ring-brand! md:h-12 lg:px-5 xl:h-[50px]",__WEBPACK_DEFAULT_EXPORT__=({handleSubmit:e,type:a="save_card",loading:r=!1,changeSaveCard:t,saveCard:o,changeDefaultCard:f,defaultCard:k,cardError:j})=>{let{t:N}=(0,d.useTranslation)("common"),{openModal:E,closeModal:v}=(0,g.SO)(),{isAuthorized:y}=(0,h.P)(),{isDarkMode:w}=(0,_.G)(),P={base:{color:w?"#ffffff":"#000000",fontSize:"13px",fontFamily:"'Inter', sans-serif",iconColor:w?"#dadada":"#3e3e3e","::placeholder":{color:w?"#6e6e6e":"#999999",fontWeight:"normal"}}};return(0,s.jsxs)("div",{className:"payment-modal flex h-full min-h-screen w-screen flex-col justify-center bg-light text-left dark:bg-dark-250 xs:h-auto xs:min-h-0 xs:max-w-[400px] md:max-w-[590px] md:rounded-xl lg:max-w-[736px]",children:[s.jsx("h3",{className:"mb-2 pl-6 pr-6 pt-8 text-center text-base font-medium tracking-[-0.3px] text-dark dark:text-light xs:mb-0 xs:border-b xs:border-dark/10 xs:py-4 xs:pr-10 xs:text-left xs:dark:border-light/10 md:py-5 md:pl-8 lg:py-6 lg:pr-16",children:N("checkout"===a?"text-payment":"profile-add-cards")}),(0,s.jsxs)("div",{className:"p-6 md:p-8",children:[p()(j)?"":s.jsx(m.Z,{className:"mb-4",message:j,variant:"error"}),(0,s.jsxs)("form",{onSubmit:e,className:"flex flex-col gap-6",children:[s.jsx(c.Z,{label:N("text-profile-name"),name:"owner_name",placeholder:N("text-profile-name"),required:!0}),s.jsx("div",{children:(0,s.jsxs)(x.Z,{children:[s.jsx("span",{className:"block cursor-pointer pb-2.5 font-normal text-dark/70 rtl:text-right dark:text-light/70",children:N("text-card-number")}),s.jsx(n.CardNumberElement,{options:{showIcon:!0,placeholder:N("text-card-number"),style:P},className:b()(u)})]})}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-5 lg:flex-nowrap",children:[(0,s.jsxs)(x.Z,{className:"mb-0 max-w-full basis-full lg:max-w-[50%] lg:basis-1/2",children:[s.jsx("span",{className:"block cursor-pointer pb-2.5 font-normal text-dark/70 rtl:text-right dark:text-light/70",children:N("text-card-expiry")}),s.jsx(n.CardExpiryElement,{options:{style:P,placeholder:N("text-expire-date-placeholder")},className:b()(u)})]}),(0,s.jsxs)(x.Z,{className:"mb-0 max-w-full basis-full lg:max-w-[50%] lg:basis-1/2",children:[s.jsx("span",{className:"block cursor-pointer pb-2.5 font-normal text-dark/70 rtl:text-right dark:text-light/70",children:N("text-card-cvc")}),s.jsx(n.CardCvcElement,{options:{style:P,placeholder:N("text-card-cvc")},className:b()(u)})]})]}),(0,s.jsxs)("div",{className:"flex flex-col md:flex-row md:items-center md:justify-between md:space-x-7 md:pt-2.5",children:[y&&"checkout"===a&&s.jsx("div",{className:"mt-1 shrink-0 md:mt-2",children:s.jsx(i.Z,{name:"save_card",label:N("text-save-card"),className:"inline-flex",onChange:t,checked:o})}),y&&"save_card"===a&&s.jsx("div",{className:"mt-1 shrink-0 md:mt-2",children:s.jsx(i.Z,{name:"make_default_card",label:N("text-add-default-card"),className:"inline-flex",onChange:f,checked:k})}),(0,s.jsxs)("div",{className:"mt-5 flex space-x-4 md:mt-2 md:items-center md:justify-end",children:[s.jsx(l.Z,{variant:"outline",onClick:v,className:"StripePay px-8 text-sm shadow-none md:px-8",children:N("text-cancel")}),s.jsx(l.Z,{type:"submit",isLoading:r,disabled:r,className:"StripePay px-8 text-sm shadow-none md:px-8",children:N("checkout"===a?"text-pay-now":"text-save")})]})]})]})]})]})};t()}catch(e){t(e)}})},92132:(e,a,r)=>{r.d(a,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var t=r(20997),s=r(59003),l=r.n(s);let __WEBPACK_DEFAULT_EXPORT__=({className:e,...a})=>t.jsx("label",{className:l()("block text-13px",e),...a})},17610:(e,a,r)=>{let t;r.d(a,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var s=r(20943);let __WEBPACK_DEFAULT_EXPORT__=()=>(t||(t=(0,s.loadStripe)("pk_12345")),t)}};