PageSourceSearch

https://boombam.app/assets/offer-guide-pricing-D73ZCQa6.js

js boombam.app collected 2026-10-04 13:33:30 UTC 6,866 bytes, 1 lines download raw bytes

1import{bo as D,cs as G,r as k,j as e,B as p,bk as y,w as B,s as b,C as x,b as g,d as f,b9 as T,e as h,ab as l,aF as w,b_ as z,ap as E,I as L,p as R}from"./index-CuSEeJFb.js";import{P as V}from"./progress-B2eMqtVV.js";import{A as j}from"./ai-assist-button-YA_IMV7l.js";import"./wand-sparkles-Cnc6tXs_.js";import"./copy-Ctw93tQ7.js";function J(){const[,o]=D(),{offerData:i,updateOfferData:C,markStepComplete:O,progress:S}=G(),[s,u]=k.useState({originalPrice:i.originalPrice||"",offerPrice:i.offerPrice||"",savings:i.savings||"",paymentOptions:i.paymentOptions||""}),n=(a,t)=>{const r={...s,[a]:t};if(u(r),a==="originalPrice"||a==="offerPrice"){const c=parseFloat(a==="originalPrice"?t:s.originalPrice)||0,m=parseFloat(a==="offerPrice"?t:s.offerPrice)||0;if(c>0&&m>0&&c>m){const P=c-m,I=Math.round(P/c*100);r.savings=`$${P.toFixed(2)} (${I}% off)`}}u(r),C(r)},d=(a,t)=>{let r=t.trim();r=r.replace(/^#{1,6}\s*/,""),r=r.replace(/\*\*(.*?)\*\*/g,"$1"),r=r.replace(/\*(.*?)\*/g,"$1"),r=r.replace(/^[•\-\*]\s*/,""),n(a,r)},$=()=>{O(4),o("/offer-guide-final-review")},F=s.offerPrice&&s.paymentOptions,N=[s.originalPrice,s.offerPrice,s.savings,s.paymentOptions].filter(Boolean).length,v=4,A=N/v*100;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(p,{variant:"ghost",size:"sm",className:"gap-2",onClick:()=>o("/offer-guide-value-proposition"),children:[e.jsx(y,{className:"h-4 w-4"}),"Back to Value Proposition"]}),e.jsx(B,{className:"h-4 w-4 text-gray-400"}),e.jsx("span",{className:"text-sm font-medium text-gray-900",children:"Pricing Structure"})]}),e.jsxs(b,{variant:"secondary",children:["Step 4 of ",S.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:"Pricing Structure"}),e.jsxs("span",{className:"text-sm text-gray-500",children:[N," of ",v," completed"]})]}),e.jsx(V,{value:A,className:"mb-4"}),e.jsx("p",{className:"text-gray-600",children:"Set your pricing structure and payment options for this offer."})]}),e.jsxs("div",{className:"grid grid-cols-1 gap-6",children:[e.jsxs(x,{children:[e.jsx(g,{children:e.jsxs(f,{className:"flex items-center gap-2",children:[e.jsx(T,{className:"w-5 h-5 text-green-600"}),"Pricing Details"]})}),e.jsxs(h,{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(l,{htmlFor:"originalPrice",children:"Original Price"}),e.jsx(j,{label:"AI Fill",prompt:`Suggest an original price for a ${i.offerTier} tier ${i.selectedService} service`,onGenerate:a=>d("originalPrice",a),currentValue:s.originalPrice,fieldName:"originalPrice",size:"sm"})]}),e.jsx(w,{id:"originalPrice",placeholder:"Enter regular price (e.g., 299.00)",value:s.originalPrice,onChange:a=>n("originalPrice",a.target.value),"data-testid":"input-original-price"}),e.jsx("p",{className:"text-xs text-gray-500",children:"The regular price before any discounts or special offers."})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(l,{htmlFor:"offerPrice",children:"Offer Price *"}),e.jsx(j,{label:"AI Fill",prompt:`Suggest a compelling offer price for ${i.name||"this offer"} with original price ${s.originalPrice}`,onGenerate:a=>d("offerPrice",a),currentValue:s.offerPrice,fieldName:"offerPrice",size:"sm"})]}),e.jsx(w,{id:"offerPrice",placeholder:"Enter special offer price (e.g., 199.00)",value:s.offerPrice,onChange:a=>n("offerPrice",a.target.value),"data-testid":"input-offer-price"}),e.jsx("p",{className:"text-xs text-gray-500",children:"The special price customers will pay for this offer."})]}),s.savings&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(l,{children:"Calculated Savings"}),e.jsx("div",{className:"p-3 bg-green-50 border border-green-200 rounded-md",children:e.jsx(b,{variant:"secondary",className:"bg-green-100 text-green-800",children:s.savings})})]})]})]}),e.jsxs(x,{children:[e.jsx(g,{children:e.jsxs(f,{className:"flex items-center gap-2",children:[e.jsx(z,{className:"w-5 h-5 text-blue-600"}),"Payment Options"]})}),e.jsx(h,{className:"space-y-4",children:e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(l,{htmlFor:"paymentOptions",children:"Payment Options *"}),e.jsx(j,{label:"AI Fill",prompt:`Suggest payment options for a ${s.offerPrice||"priced"} ${i.selectedService} offer`,onGenerate:a=>d("paymentOptions",a),currentValue:s.paymentOptions,fieldName:"paymentOptions",size:"sm"})]}),e.jsx(E,{id:"paymentOptions",placeholder:"Describe payment options (e.g., one-time payment, payment plans, accepted methods)...",value:s.paymentOptions,onChange:a=>n("paymentOptions",a.target.value),className:"min-h-[100px]","data-testid":"textarea-payment-options"}),e.jsx("p",{className:"text-xs text-gray-500",children:"Include payment plans, accepted methods, and any payment terms."})]})})]}),e.jsxs(x,{className:"bg-orange-50 border-orange-200",children:[e.jsx(g,{children:e.jsxs(f,{className:"flex items-center gap-2 text-orange-700",children:[e.jsx(L,{className:"w-5 h-5"}),"Pricing Summary"]})}),e.jsx(h,{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-orange-600 font-medium",children:"Regular Price:"}),e.jsxs("p",{className:"text-lg font-bold text-gray-500 line-through",children:["$",s.originalPrice]})]}),s.offerPrice&&e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-sm text-orange-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-orange-600 font-medium",children:"You Save:"}),e.jsx("p",{className:"text-lg font-bold text-red-600",children:s.savings})]})]})})]})]}),e.jsxs("div",{className:"flex justify-between items-center mt-8 pt-6 border-t",children:[e.jsxs(p,{variant:"outline",className:"gap-2",onClick:()=>o("/offer-guide-value-proposition"),children:[e.jsx(y,{className:"w-4 h-4"}),"Previous Step"]}),e.jsxs(p,{onClick:$,disabled:!F,className:"gap-2 bg-orange-600 hover:bg-orange-700","data-testid":"button-continue",children:["Complete Offer Guide",e.jsx(R,{className:"w-4 h-4"})]})]})]})]})}export{J 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.