2 lines
8.9 KiB
JavaScript
2 lines
8.9 KiB
JavaScript
import{j as e}from"./jsx-runtime-D_zvdyIk.js";import"./DataTable-COYdcx41.js";import"./FormField-C0UylACv.js";import"./OtpInput-6kd_2E0v.js";import"./OtpExpiryDisplay-BGgB7Tk6.js";import"./SearchFilterBar-Ds19v0-P.js";import"./PaginationBar-D_k7ztRb.js";import"./DetailHeader-C0ZsoM39.js";import"./AlertBanner-Bnlyj1xc.js";import"./skeleton-ISCbfaf8.js";import"./loading-card-BIOTKPal.js";import"./error-state-BSicqqE6.js";import{f as N}from"./date-Csq1SWDU.js";import"./index-BKyvj4H5.js";import"./SectionHeader-Bo81Whai.js";import"./ProgressSteps-weVdXcqu.js";import"./SubCard-1OZIPgEM.js";import{A as y}from"./AnimatedCard-DFAiX4zP.js";import"./ServiceCard-BJEHFLba.js";import"./SummaryStats-D6b7Am-p.js";import"./FilterDropdown-CUU04WmN.js";import"./ClearFiltersButton-CPCoyXk2.js";import"./DetailStatsGrid-CDkKTM-B.js";import"./SectionCard-BcUjc-7N.js";import"./MetricCard-BR1xVIXz.js";import"./BackLink-C5IY6wzy.js";import"./status-badge-5pzxe45J.js";import"./error-boundary-DIRO_cDI.js";import"./error-fallbacks-kSPsNxmV.js";import{B as u}from"./button-C8_cybvS.js";import"./input-BbGJiz0K.js";import"./password-input-D4khGh8v.js";import"./checkbox-DahUyQbt.js";import"./label-C25VH7yk.js";import"./error-message-DeFFz6H_.js";import"./status-pill-wWp9xkwA.js";import"./badge-BdMsasyi.js";import"./spinner-mU4XywER.js";import"./loading-overlay-DMJTiFny.js";import"./empty-state-DRUGJ9ip.js";import"./inline-toast-DQJ-O9wc.js";import"./logo-f0fprTjz.js";import{S as v}from"./step-header-C0A-1Uoh.js";import"./status-indicator-C7K_QPts.js";import"./view-toggle-ja_vihxz.js";import"./animated-container-DyAZ9gmw.js";import{F as w}from"./ArrowLeftIcon-Cw1eswTb.js";import{F as S}from"./ArrowRightIcon--Vuz7Q7x.js";function T(t){return t?t.billingCycle==="Monthly"?t.monthlyPrice??t.unitPrice??0:t.oneTimePrice??t.unitPrice??0:0}function P({simType:t,eid:r,activationType:i,scheduledActivationDate:n,wantsMnp:a}){return e.jsxs("div",{className:"border-t border-border pt-4 mb-6",children:[e.jsx("h4",{className:"font-medium text-foreground mb-3",children:"Configuration"}),e.jsxs("div",{className:"space-y-2 text-sm",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"SIM Type:"}),e.jsx("span",{className:"text-foreground",children:t||"Not selected"})]}),t==="eSIM"&&r&&e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"EID:"}),e.jsxs("span",{className:"text-foreground font-mono text-xs",children:[r.slice(0,12),"..."]})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Activation:"}),e.jsx("span",{className:"text-foreground",children:i==="Scheduled"&&n?N(n):i||"Not selected"})]}),a&&e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Number Porting:"}),e.jsx("span",{className:"text-foreground",children:"Requested"})]})]})]})}function q(t){var c;const{plan:r,simType:i,eid:n,activationType:a,scheduledActivationDate:p,wantsMnp:x,selectedAddons:d,addons:f,activationFee:o,monthlyTotal:h,oneTimeTotal:l,isDefault:j}=t;return e.jsxs("div",{className:"max-w-lg mx-auto mb-8 bg-card shadow-[var(--cp-shadow-2)] rounded-lg border border-border p-6",children:[e.jsxs("div",{className:"text-center border-b-2 border-dashed border-border/60 pb-4 mb-6",children:[e.jsx("h3",{className:"text-xl font-bold text-foreground mb-1",children:"Order Summary"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Review your configuration"})]}),e.jsx("div",{className:"space-y-3 mb-6",children:e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"font-semibold text-foreground",children:r.name}),e.jsx("p",{className:"text-sm text-muted-foreground",children:r.simDataSize})]}),e.jsxs("div",{className:"text-right",children:[e.jsxs("p",{className:"font-semibold text-foreground",children:["¥",(c=r.monthlyPrice)==null?void 0:c.toLocaleString()]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"per month"})]})]})}),e.jsx(P,{simType:i,eid:n,activationType:a,scheduledActivationDate:p,wantsMnp:x}),d.length>0&&e.jsxs("div",{className:"border-t border-border pt-4 mb-6",children:[e.jsx("h4",{className:"font-medium text-foreground mb-3",children:"Add-ons"}),e.jsx("div",{className:"space-y-2",children:d.map(m=>{const s=f.find(b=>b.sku===m),g=T(s);return e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:(s==null?void 0:s.name)||m}),e.jsxs("span",{className:"text-foreground",children:["¥",g.toLocaleString(),e.jsxs("span",{className:"text-xs text-muted-foreground ml-1",children:["/",(s==null?void 0:s.billingCycle)==="Monthly"?"mo":"once"]})]})]},m)})})]}),o&&e.jsxs("div",{className:"border-t border-border pt-4 mb-6",children:[e.jsx("h4",{className:"font-medium text-foreground mb-3",children:"One-time Fees"}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:o.name}),e.jsxs("span",{className:"text-foreground",children:["¥",o.amount.toLocaleString()]})]}),j&&e.jsx("p",{className:"text-xs text-muted-foreground",children:"Required for all new SIM activations"})]})]}),e.jsx("div",{className:"border-t-2 border-dashed border-border/60 pt-4 bg-muted -mx-6 px-6 py-4 rounded-b-lg",children:e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between text-xl font-bold",children:[e.jsx("span",{className:"text-foreground",children:"Monthly Total"}),e.jsxs("span",{className:"text-primary",children:["¥",h.toLocaleString()]})]}),l>0&&e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:"One-time Total"}),e.jsxs("span",{className:"text-warning font-semibold",children:["¥",l.toLocaleString()]})]}),e.jsx("p",{className:"text-xs text-muted-foreground pt-2",children:"Prices exclude 10% consumption tax"})]})})]})}function C(t){const{onBack:r,onConfirm:i,...n}=t;return e.jsxs(y,{variant:"static",className:"p-8",children:[e.jsx("div",{className:"mb-6",children:e.jsx(v,{stepNumber:5,title:"Review Your Order",description:"Review your configuration and proceed to checkout"})}),e.jsx(q,{...n}),e.jsx("div",{className:"max-w-lg mx-auto mb-6 bg-info/10 border border-info/25 rounded-lg p-4",children:e.jsxs("p",{className:"text-sm text-foreground",children:[e.jsx("span",{className:"font-medium",children:"Next steps after checkout:"})," ",e.jsx("span",{className:"text-muted-foreground",children:"We'll review your order and ID verification within 1-2 business days. You'll receive an email once approved."})]})}),e.jsxs("div",{className:"flex justify-between items-center pt-6 border-t border-border",children:[e.jsx(u,{onClick:r,variant:"outline",size:"lg",className:"px-8 py-4 text-lg",leftIcon:e.jsx(w,{className:"w-5 h-5"}),children:"Back to Number Porting"}),e.jsx(u,{onClick:i,size:"lg",className:"px-12 py-4 text-lg font-semibold",rightIcon:e.jsx(S,{className:"w-5 h-5"}),children:"Proceed to Checkout"})]})]})}C.__docgenInfo={description:"",methods:[],displayName:"ReviewOrderStep",props:{plan:{required:!0,tsType:{name:"z.infer",elements:[{name:"simCatalogProductSchema"}],raw:"z.infer<typeof simCatalogProductSchema>"},description:""},simType:{required:!0,tsType:{name:"union",raw:'"eSIM" | "Physical SIM" | ""',elements:[{name:"literal",value:'"eSIM"'},{name:"literal",value:'"Physical SIM"'},{name:"literal",value:'""'}]},description:""},eid:{required:!0,tsType:{name:"string"},description:""},activationType:{required:!0,tsType:{name:"union",raw:'"Immediate" | "Scheduled" | ""',elements:[{name:"literal",value:'"Immediate"'},{name:"literal",value:'"Scheduled"'},{name:"literal",value:'""'}]},description:""},scheduledActivationDate:{required:!0,tsType:{name:"string"},description:""},wantsMnp:{required:!0,tsType:{name:"boolean"},description:""},selectedAddons:{required:!0,tsType:{name:"Array",elements:[{name:"string"}],raw:"string[]"},description:""},addons:{required:!0,tsType:{name:"Array",elements:[{name:"z.infer",elements:[{name:"simCatalogProductSchema"}],raw:"z.infer<typeof simCatalogProductSchema>"}],raw:"SimCatalogProduct[]"},description:""},activationFee:{required:!1,tsType:{name:"union",raw:"ActivationFeeDetails | undefined",elements:[{name:"ActivationFeeDetails"},{name:"undefined"}]},description:""},monthlyTotal:{required:!0,tsType:{name:"number"},description:""},oneTimeTotal:{required:!0,tsType:{name:"number"},description:""},onBack:{required:!0,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:""},onConfirm:{required:!0,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:""},isDefault:{required:!1,tsType:{name:"union",raw:"boolean | undefined",elements:[{name:"boolean"},{name:"undefined"}]},description:""}}};export{C as R};
|