1import{bo as y,cs as b,_ as w,r as S,j as e,B as r,bk as p,w as C,s as l,f as g,C as c,b as n,d,b6 as P,e as x,S as k,D as B,i as R,b9 as T}from"./index-CuSEeJFb.js";import{P as O}from"./progress-B2eMqtVV.js";import{S as L}from"./save-DMqvNvzo.js";function I(){const[,i]=y(),{offerData:s,markStepComplete:f,saveToLibrary:N,progress:u}=b(),{toast:m}=w(),[o,h]=S.useState(!1),v=async()=>{h(!0);try{await N(),f(5),m({title:"Success!",description:"Your offer has been saved to the library."}),i("/offer-creator")}catch{m({title:"Error",description:"Failed to save offer. Please try again.",variant:"destructive"})}finally{h(!1)}},j=s.name&&s.headline&&s.description&&s.type&&s.coreValue&&s.transformation&&s.benefits.length>0&&s.features.length>0&&s.offerPrice;return e.jsxs("div",{className:"min-h-screen bg-gray-50",children:[e.jsx("header",{className:"bg-white shadow-sm",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs("nav",{className:"flex items-center justify-between h-16",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(r,{variant:"ghost",size:"sm",className:"gap-2",onClick:()=>i("/offer-guide-pricing"),children:[e.jsx(p,{className:"h-4 w-4"}),"Back to Pricing"]}),e.jsx(C,{className:"h-4 w-4 text-gray-400"}),e.jsx("span",{className:"text-sm font-medium text-gray-900",children:"Final Review"})]}),e.jsxs(l,{variant:"secondary",children:["Step 5 of ",u.totalSteps]})]})})}),e.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[e.jsxs("div",{className:"mb-8",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Final Review"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(g,{className:"w-5 h-5 text-green-600"}),e.jsx("span",{className:"text-sm text-green-600 font-medium",children:"Ready to save"})]})]}),e.jsx(O,{value:100,className:"mb-4"}),e.jsx("p",{className:"text-gray-600",children:"Review your complete offer before saving it to your library."})]}),e.jsxs("div",{className:"grid grid-cols-1 gap-6",children:[e.jsxs(c,{children:[e.jsx(n,{children:e.jsxs(d,{className:"flex items-center gap-2",children:[e.jsx(P,{className:"w-5 h-5 text-blue-600"}),"Basic Information"]})}),e.jsxs(x,{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Service:"}),e.jsx(l,{variant:"outline",children:s.selectedService})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Tier:"}),e.jsx(l,{variant:"outline",children:s.offerTier})]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Offer Name:"}),e.jsx("p",{className:"text-lg font-semibold",children:s.name})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Type:"}),e.jsx("p",{children:s.type})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Headline:"}),e.jsx("p",{className:"text-lg",children:s.headline})]}),s.subheadline&&e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Subheadline:"}),e.jsx("p",{children:s.subheadline})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Description:"}),e.jsx("p",{className:"text-gray-700",children:s.description})]})]})]}),e.jsxs(c,{children:[e.jsx(n,{children:e.jsxs(d,{className:"flex items-center gap-2",children:[e.jsx(k,{className:"w-5 h-5 text-purple-600"}),"Value Proposition"]})}),e.jsxs(x,{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Core Value:"}),e.jsx("p",{className:"text-gray-700",children:s.coreValue})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Transformation Promise:"}),e.jsx("p",{className:"text-gray-700",children:s.transformation})]}
1),s.benefits.length>0&&e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-gray-600 mb-2",children:"Key Benefits:"}),e.jsx("div",{className:"space-y-1",children:s.benefits.map((a,t)=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(B,{className:"w-4 h-4 text-yellow-500"}),e.jsx("span",{className:"text-sm",children:a})]},t))})]}),s.features.length>0&&e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-gray-600 mb-2",children:"Features & Inclusions:"}),e.jsx("div",{className:"space-y-1",children:s.features.map((a,t)=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(g,{className:"w-4 h-4 text-green-500"}),e.jsx("span",{className:"text-sm",children:a})]},t))})]}),s.bonuses.length>0&&e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-gray-600 mb-2",children:"Bonuses & Extras:"}),e.jsx("div",{className:"space-y-1",children:s.bonuses.map((a,t)=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(R,{className:"w-4 h-4 text-blue-500"}),e.jsx("span",{className:"text-sm",children:a})]},t))})]})]})]}),e.jsxs(c,{children:[e.jsx(n,{children:e.jsxs(d,{className:"flex items-center gap-2",children:[e.jsx(T,{className:"w-5 h-5 text-green-600"}),"Pricing Structure"]})}),e.jsxs(x,{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.originalPrice&&e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-sm text-gray-600 font-medium",children:"Regular Price:"}),e.jsxs("p",{className:"text-lg font-bold text-gray-500 line-through",children:["$",s.originalPrice]})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-sm text-gray-600 font-medium",children:"Offer Price:"}),e.jsxs("p",{className:"text-2xl font-bold text-green-600",children:["$",s.offerPrice]})]}),s.savings&&e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-sm text-gray-600 font-medium",children:"You Save:"}),e.jsx("p",{className:"text-lg font-bold text-red-600",children:s.savings})]})]}),s.paymentOptions&&e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-gray-600",children:"Payment Options:"}),e.jsx("p",{className:"text-gray-700",children:s.paymentOptions})]})]})]})]}),e.jsxs("div",{className:"flex justify-between items-center mt-8 pt-6 border-t",children:[e.jsxs(r,{variant:"outline",className:"gap-2",onClick:()=>i("/offer-guide-pricing"),children:[e.jsx(p,{className:"w-4 h-4"}),"Make Changes"]}),e.jsxs(r,{onClick:v,disabled:!j||o,className:"gap-2 bg-orange-600 hover:bg-orange-700","data-testid":"button-save-offer",children:[e.jsx(L,{className:"w-4 h-4"}),o?"Saving...":"Save to Library"]})]}),!j&&e.jsx("div",{className:"mt-4 p-4 bg-yellow-50 border border-yellow-200 rounded-md",children:e.jsx("p",{className:"text-sm text-yellow-800",children:"Please complete all required fields before saving your offer."})})]})]})}export{I 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.