(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7581],{77581:function(e,t,l){"use strict";l.r(t),l.d(t,{ValuationForm:function(){return el}});var a=l(57437),i=l(2265),n=l(51778),o=l(21180),s=l(78757),r=l(92456),d=l(25955),c=l(21958),u=l(76834),m=l(61076),h=l(11757),v=l(33545),f=l(31827),p=l(25076),x=l(38694),y=l(98634),b=l(45912),g=l(69645),j=l(73799),w=l(60996),_=l(32842),N=l(53066),S=l(82670);let k=[{name:"adjustments.forSale",type:"button",label:"Is your car currently for sale?",options:["Yes","No"]},{name:"adjustments.documentation",type:"button",label:"Describe your vehicles service documentation?",options:["Full manufacturer service documentation","Partial service history with service documentation","Missing books"]},{name:"adjustments.condition",type:"button",label:"Describe your vehicles condition",options:["Excellent","Good","Poor"]},{name:"adjustments.mechanicalCondition",type:"button",label:"Describe your vehicles Mechanical condition",options:["Good/No issues","Poor/Some Issues"]},{name:"adjustments.dashlights",type:"button",label:"Are there any dash warning lights on your vehicle?",options:["No","Yes"]},{name:"adjustments.roadworthyTyres",type:"button",label:"In your opinion are your tyres in a roadworthy condition?",options:["Yes","No"]},{name:"adjustments.windscreenCondition",type:"button",label:"Is your windscreen free from cracks and scratches?",options:["Yes","No"]}],C=()=>{var e;let t=(0,m.i)(),{setValue:l}=(0,S.Gc)();return(0,i.useEffect)(()=>{var e;(null==t?void 0:null===(e=t.query)||void 0===e?void 0:e.source)==="autograb"&&l("leadSource",t.query.source)},[null==t?void 0:null===(e=t.query)||void 0===e?void 0:e.source,l]),null};var V=l(94321),D=l(96027),F=l(31911),E=l(13593);let M=o.default;var I=e=>{let{placeholder:t="Please select a dealership...",locations:l=M.locations,make:n,locationType:o,showCityName:s=!1,useDealership:r=!1,...d}=e,c=r?"dealership_id":"location_id",{watch:u,setValue:m}=(0,S.Gc)(),[h,v]=(0,i.useState)(!1),[f,p]=(0,i.useState)(null),[x,y]=(0,i.useState)(""),b=u().postcode,g=(0,i.useMemo)(()=>{var e;let t=[...l];return n&&(t=t.filter(e=>e.manufacturers.includes(n))),o&&(t=(0,F.eq)(t,null==o?void 0:o.toLowerCase())),f&&(t=t.map(e=>({...e,distance:(0,F.cL)(f.lat,f.lng,parseFloat(e.address.lat),parseFloat(e.address.lang))})).sort((e,t)=>e.distance-t.distance)),(0,F.QB)(t,s,r)},[o,l,n,s,r,f]),j=(0,i.useCallback)(async()=>{if(4==="".concat(b).length&&b!==x){y(b);try{let{lat:e,lng:t}=await (0,F.kL)(b);p({lat:e,lng:t})}catch(e){console.error(e.message)}}},[x,b]);return((0,i.useEffect)(()=>{h||1!==g.length||(m(c,g[0].value),v(!0)),b&&j()},[h,j,c,g,b,m]),g&&0!==g.length)?(0,a.jsx)(E.default,{defaultValue:"",placeholder:t,options:g||[],...d,name:c}):null},P=l(2753),O=l(15275),T=l(1799),q=l(59581),L=l(26582),W=l(47212),A=l(90949),Y=l(51091);let G=e=>{var t;let{isSuccessPage:l}=e,[i,n]=(0,s.KO)(c.$i);return!(null==i?void 0:i.make)||(null==i?void 0:i.valuation_range)?null:(0,a.jsxs)(Y.Zb,{className:"mb-3",style:{borderRadius:"1rem"},children:[(0,a.jsxs)(Y.Ol,{children:[(0,a.jsx)(Y.ll,{className:"text-primary",style:{fontSize:"1.25rem"},children:"Your Current Trade-In Vehicle"}),!l&&(0,a.jsxs)(Y.SZ,{children:["You have already received a valuation for this ",null==i?void 0:i.year," ",null==i?void 0:i.make,"\xa0",null==i?void 0:i.model,". If you have another vehicle you would like to trade-in, get started below."]})]}),(0,a.jsx)(Y.aY,{children:(0,a.jsxs)("ul",{className:"mb-0",children:[(null==i?void 0:i.make)&&(0,a.jsxs)("li",{children:["Your Vehicle:\xa0",(0,a.jsxs)("strong",{children:[null==i?void 0:i.year," ",null==i?void 0:i.make," ",null==i?void 0:i.model]})]}),(null==i?void 0:i.offer_price)&&!(null==i?void 0:i.valuation_range)&&(0,a.jsxs)("li",{children:["Estimated Valuation: ",(0,a.jsxs)("strong",{children:["$",null==i?void 0:null===(t=i.offer_price)||void 0===t?void 0:t.toLocaleString()]})]})]})}),(0,a.jsx)(Y.eW,{children:!l&&(0,a.jsx)("button",{className:"btn btn-primary",onClick:()=>n({}),children:"Add Another Vehicle"})})]})};var z=l(43218),B=l.n(z);let Z=e=>{var t,l;let{car:i}=e;return!(null===(t=u.default.valuationWizard)||void 0===t?void 0:t.locationSelect)||(null==i?void 0:i.id)?null:(null===(l=u.default.valuationWizard)||void 0===l?void 0:l.CustomLocationInput)?(0,a.jsx)(u.default.valuationWizard.CustomLocationInput,{}):j.HmL?(0,a.jsx)("div",{className:"col-12",children:(0,a.jsx)(I,{locationType:"sales",label:"Select A Location Near You",useDealership:!0})}):(0,a.jsx)("div",{className:"col-12",children:(0,a.jsx)(L.default,{locationType:"sales",label:"Preferred Dealership"})})},K=e=>{let{data:t}=e,{isSubmitting:l}=(0,S.cl)();return(0,a.jsxs)("div",{className:B().vehicleCheck,children:[(0,a.jsx)("p",{children:"Your Vehicle:"}),(0,a.jsxs)("h5",{children:[t.year," ",t.make," ",t.model]}),(0,a.jsx)("h6",{className:"card-subtitle mb-2 text-muted",children:t.badge}),j.c1m&&(0,a.jsx)("button",{className:"".concat(B().searchButton," btn btn-primary my-3"),type:"submit",children:l?"Loading...":u.default.valuationWizard.submitText?u.default.valuationWizard.submitText:"Enquire Now"}),(0,a.jsx)("small",{className:"text-center",children:"There's a chance these details might not match your car. Please double check that they are correct for your car before proceeding."}),j.el2&&(0,a.jsxs)("small",{className:"text-center",children:["Please ensure the details of your car are correct - if not, your on-screen offer may not be accurate and will not be valid. In this case, please"," ",(0,a.jsx)(b.default,{href:"/contact",children:"contact"})," one of our locations below to discuss your vehicle in person."]})]})},R=()=>{let[e]=(0,s.KO)(c.Gp);return e?j.c1m?(0,a.jsx)("div",{className:" rounded w-100 p-3 bg-primary my-3",children:(0,a.jsx)("p",{className:"text-center text-white",children:"Thank you for your enquiry, the Blinkr team will be in touch with you shortly to provide a competitive offer and explain the hassle-free selling process."})}):(0,a.jsx)("div",{className:(0,g.cn)(B().exclusionMessage," bg-danger mx-2"),children:(0,a.jsx)("div",{children:e})}):null},H=[{name:"vehicle-details",type:"CUSTOM",component:e=>{var t,l,i,n;let{car:r,dark:d,termsMessage:m,resetForm:h,setSwitchToTradeIn:v,recentSearchError:f,vehicleSearchError:p}=e,{isSubmitted:x,isSubmitting:y}=(0,S.cl)(),{setValue:b}=(0,S.Gc)(),[N]=(0,s.KO)(c.$i),[k]=(0,s.KO)(c.Gp),C=j.HmL;if(N.offer_price)return(0,a.jsx)(G,{});let V=N.id&&x,D=j.el2?"Confirm Vehicle for Offer":"Search Vehicle";return(0,a.jsxs)("div",{className:(0,g.cn)(d&&"text-white","container px-md-2"),children:[!j.el2&&(0,a.jsx)(R,{}),(0,a.jsxs)("div",{className:"row",children:[(0,a.jsx)("div",{className:"col-12 col-md-6",children:(0,a.jsx)(P.default,{name:"kms",placeholder:"Vehicle Kilometers",label:!0})}),(0,a.jsx)("div",{className:"col-12 col-md-6",children:(0,a.jsx)(E.default,{name:"regoState",placeholder:"State",label:!0,defaultValue:(null===o.default||void 0===o.default?void 0:null===(t=o.default.address)||void 0===t?void 0:t.state)?null===o.default||void 0===o.default?void 0:null===(l=o.default.address)||void 0===l?void 0:l.state:"",options:A.$q.map(e=>({label:e,value:e}))})}),C&&(0,a.jsx)("div",{className:"col-12 col-md-6 ",children:(0,a.jsx)(O.default,{name:"postcode",placeholder:"Postcode",label:!0})}),(0,a.jsxs)("div",{className:(0,g.cn)("col-12",C&&"col-md-6"),children:[(0,a.jsx)(T.default,{name:"rego",placeholder:u.default.valuationWizard.customRegoField?u.default.valuationWizard.customRegoField:"Number Plate",label:!0}),(null===(i=u.default.valuationWizard)||void 0===i?void 0:i.imNotSure)&&(0,a.jsx)("div",{children:(0,a.jsx)("small",{className:B().ImNotSure,onClick:()=>v(!0),children:"I'm not sure.."})}),!1]}),(j.EY6||j.pA9)&&(0,a.jsx)(W.MR,{}),(0,a.jsxs)("div",{className:"col-12",children:[!j.EY6&&!j.pA9&&(0,a.jsx)(w.Z,{label:!0}),(0,a.jsx)(q.default,{name:"message",label:"Enquiry Details",placeholder:"Please specify your trade-in enquiry.",required:!1,rows:5})]}),(null===(n=u.default.valuationWizard)||void 0===n?void 0:n.CustomFields)&&(0,a.jsx)(u.default.valuationWizard.CustomFields,{car:r}),(0,a.jsx)(Z,{car:r})]}),(0,a.jsx)("small",{style:{color:"#6c757d"},children:m}),(0,a.jsx)(R,{}),(0,a.jsx)("div",{className:"row justify-content-center",children:V||k?(0,a.jsx)("button",{className:(0,g.cn)(B().searchButton,"btn mt-3",j.c1m?"btn-primary":j.EoA?"btn-secondary":"btn-danger"),onClick:()=>{b("rego",""),h()},type:"button",children:"Start New Search"}):(0,a.jsxs)("button",{className:B().searchButton+" btn btn-primary mt-3",type:"submit",children:[D," ",y&&!N.id&&(0,a.jsx)(_.Z,{})]})}),V&&(0,a.jsx)(K,{data:N}),p&&(0,a.jsxs)("div",{className:B().vehicleCheck,children:[(0,a.jsx)("p",{children:"Sorry, we couldn`t find your vehicle."}),(0,a.jsx)("p",{children:"Please check your details and try again."})]}),f&&(0,a.jsxs)("div",{className:B().vehicleCheck,children:[(0,a.jsx)("p",{children:"Sorry, you've already searched with those details."}),(0,a.jsx)("p",{children:"Please update your Number Plate or State details and try again."})]})]},"vehicleDetailsStep")}}],U=[{name:"vehicle-conditions",type:"CUSTOM",component:e=>{let{dark:t}=e,[l]=(0,s.KO)(c.$i),n=(0,i.useMemo)(()=>{var e;let t=null!==(e=null==l?void 0:l.form_questions)&&void 0!==e?e:[];return(null==t?void 0:t.length)===0?k:t.map(e=>{var t,l;return{name:"adjustments.".concat((0,D.XB)(e.question)),type:"button",label:e.question,options:null!==(l=null===(t=e.answers)||void 0===t?void 0:t.map(e=>null==e?void 0:e.answer))&&void 0!==l?l:[]}})},[null==l?void 0:l.form_questions]);return(0,a.jsx)("div",{className:(0,g.cn)(t&&"text-white","container px-md-2"),children:n.map((e,t)=>(0,a.jsx)(V.Z,{...e},e.name+t))},"vehicleConditionStep")}}],$=[{name:"valuation",type:"CUSTOM",component:e=>{var t,l,i;let{dark:n}=e,[r]=(0,s.KO)(c.$i),d=(null==r?void 0:r.valuation_range)?"We estimate your car is valued between the range of ":"Based on the details you have provided, estimated value for your ".concat(r.year,"\n      ").concat(r.make," ").concat(r.model," is");return(0,a.jsx)("div",{className:(0,g.cn)(n&&"text-white","container px-md-2"),children:(0,a.jsxs)("div",{className:"container text-center",children:[(0,a.jsx)(N.Hc,{children:d}),(0,a.jsx)("hr",{}),(0,a.jsx)("div",{className:"text-success",children:r.offer_price?(0,a.jsx)(a.Fragment,{children:r.exclusion?(0,a.jsx)("h5",{children:"We are unable to provide an online valuation - However, we would love to give you an on-site valuation."}):(null==r?void 0:r.valuation_range)?(0,a.jsxs)("h3",{children:[r.valuation_range,"*"]}):(0,a.jsxs)("h3",{children:[(i=null==r?void 0:null===(t=r.offer_price)||void 0===t?void 0:t.toString())?"$"+parseInt(i).toFixed(0).replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"):"$0.00","*"]})}):(0,a.jsx)(_.Z,{})}),j.e5n&&(0,a.jsx)("p",{className:"small mt-0",children:"All offers made by ".concat(o.default.name," for the trade-in or sale of your vehicle are\n          subject to inspection and verification by ").concat(o.default.name,". The final offer value\n          will be confirmed upon viewing the vehicle in person.")}),(0,a.jsx)("p",{className:"small mt-0",children:"*Estimate does not take into consideration any additional accessories you might have had fitted to the car. We will factor those in at inspection."}),u.default.valuationWizard.OfferContent?(0,a.jsx)(u.default.valuationWizard.OfferContent,{}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h4",{children:"Happy with the estimated value?"}),(0,a.jsx)("p",{children:"Please submit an enquiry to proceed"})]}),(null===(l=u.default.forms)||void 0===l?void 0:l.CustomFormDisclaimer)&&(0,a.jsx)(u.default.forms.CustomFormDisclaimer,{})]})})}}],Q=[...(0,w.i)({label:!0}),{type:"kilometre",name:"kms",label:"Vehicle Kilometers",placeholder:"Vehicle Kilometers"},{type:"string",name:"rego",label:"Vehicle Registration",placeholder:"Vehicle Registration"},{type:"textarea",name:"message",label:"Enquiry Details",placeholder:"Please specify your trade-in enquiry."},{type:"CUSTOM",name:"location_id",component:Z},{name:"opt_in",type:"check",required:!1,label:"Yes, I would like to subscribe to receive latest offers & product updates."}],X=j.qvG?"Estimated Online Valuation":j.ooc?"Estimated Online Valuation":j.el2?"Get Instant Offer*":"Estimated Valuation Offer",J={"Rego Lookup":{fields:[{name:"rego",type:"rego",lookupType:"autograb"}],heading:"Find Your Car",description:"Please fill in your vehicle’s details below."},"User Details":{fields:Q,heading:"User Details",description:"Please fill in your details below"},"Vehicle Details":{fields:H,heading:"Vehicle Details",description:j.iYi?"Please fill in your vehicle’s details below for a system generated instant offer":j.el2?"To get your instant on-screen offer, please enter details below.":"Please enter your vehicle's odometer, state and registration details."},"Vehicle Conditions":{fields:U,heading:"Vehicle Conditions",description:""},"Valuation Offer":{fields:$,heading:X,description:""}},ee=j.el2?"Oh no! We can't give an on-screen offer on this car \uD83D\uDE1F. Please get in touch with our friendly team at one of the locations below \uD83D\uDE0A.":"Sorry, we cannot value this vehicle online. A team member will call you to discuss your vehicle.",et="sell-my-car-instant-offer"===o.default.slug||j.Zkx||j.baD,el=e=>{var t,l;let{page_id:w,customTermsMessage:_=!1,removeWidth:N=!1,car:S,setSwitchToTradeIn:k}=e,V=(0,m.i)(),D=(0,i.useRef)(null),{stepKeys:F,steps:E}=(0,h.G)(J,et?["Vehicle Details"]:["Rego Lookup","User Details"]),M=(0,h.w)(E),{formData:I,isLastStep:P,nextStep:O,setFormData:T,stepIndex:q,setCurrentError:L}=M,W=F[q],[A,Y]=(0,s.KO)(c.$i),G=(0,d.useUserTrackingForLead)(),z=(0,s.b9)(r.m4),Z=(0,s.b9)(c.Gp),[K,R]=(0,i.useState)(!1),[H,U]=(0,i.useState)(!1),[$,Q]=(0,i.useState)(!1);(0,i.useEffect)(()=>{j.SL0&&k(!0)},[k]);let X=()=>{Y({}),L(""),Z(""),R(!1)},el=async e=>{let t=S?18:40,l=n.Z[t].eventCategory,a={category:l,...I,...e};w&&(a.page_id=w),T(a);let i=null==G?void 0:G.firstPageQuery,o=null==G?void 0:G.visitedPages,s=et?a["Vehicle State"]:a.regoState;if(P){let{email:e,phone:i,message:o,postcode:s}=a,r={category:l,subcategory:"3. Offer Accepted",lead_id:A.lead_id,form_completed:!0,offer_accepted:!0,message:o,postcode:s};return(0,v.Af)(r).then(()=>{(0,y._c)({eventId:t,userData:{email:e,phone:i}}),(null==S?void 0:S.id)&&z(S),(0,v.lM)(V,n.Z[t].eventCategory)})}switch(W){case"Rego Lookup":O();break;case"User Details":(0,y._c)({eventId:43,userData:{email:a.email,phone:a.phone}});let r=await (0,c.CE)({userData:{...a,rego_state:s},car:S,firstPageQuery:i,visitedPages:o});if(null==r?void 0:r.lead_id)Y({...r,offer_price:null}),r.exclusion?L(ee):O();else{var d;L(null!==(d=null==r?void 0:r.error)&&void 0!==d?d:"An unknown error occured: A vehicle valuation cannot be provided at this time.")}case"Vehicle Details":if(K){O();break}{if(A.rego===a.rego&&A.rego_state===s){U(!0);break}(0,y._c)({eventId:43,userData:{email:a.email,phone:a.phone}}),Y({});let e=await (0,c.CE)({userData:{...a,rego_state:s},car:S,firstPageQuery:i,visitedPages:o});(null==e?void 0:e.lead_id)?(Y({...e,offer_price:null}),Q(!1),L(""),e.exclusion?Z(ee):R(!0)):(Q(!0),(null==e?void 0:e.error)?L(null==e?void 0:e.error):L("An unknown error occured: A vehicle valuation cannot be provided at this time."));break}case"Vehicle Conditions":(0,y._c)({eventId:50,userData:{email:a.email,phone:a.phone}});let u=await (0,c.uB)({adjustments:a.adjustments,id:A.id});(null==u?void 0:u.offer_price)?(D.current.scrollIntoView(),Y({...A,...u}),O()):(null==u?void 0:u.error)?L(null==u?void 0:u.error):L("An unknown error occured: A vehicle valuation cannot be provided at this time.")}},ea=(0,a.jsx)("span",{children:_||(0,a.jsx)(a.Fragment,{children:(null===o.default||void 0===o.default?void 0:null===(t=o.default.valuation)||void 0===t?void 0:t.valuation_terms_and_conditions_url)&&(0,a.jsxs)(a.Fragment,{children:["By clicking search I agree with the"," ",(0,a.jsx)(b.default,{href:j.EY6?"/pages/sell-your-car-terms-and-conditions":null===o.default||void 0===o.default?void 0:null===(l=o.default.valuation)||void 0===l?void 0:l.valuation_terms_and_conditions_url,children:"Terms and Conditions*"})]})})}),ei=!u.default.halfDarkMode&&u.default.darkMode;return(0,a.jsx)("div",{className:B().formContainer,children:(0,a.jsxs)("div",{ref:D,className:"overflow-hidden ".concat(B().formBody," ").concat(N?"":B().formWidth," ").concat(ei?"bg-dark":"bg-white"),children:[(0,a.jsx)(x.Z,{totalSteps:F.length,currentStep:q+1,wrapperClassName:(0,g.cn)("w-100 pt-3 pb-0 overflow-hidden",ei?"text-white":""),stepData:F.map(e=>({heading:J[e].heading,description:J[e].description})),stepHeadingClass:B().stepHeading}),(0,a.jsxs)(p.l0,{className:"w-100",onSubmit:el,defaultValues:{regoState:o.default.address.state},children:[F.map((e,t)=>t!==q?null:(0,a.jsx)(f.p,{currentFields:J[e].fields,heading:J[e].heading||e,cardContentClassName:"px-0 px-md-4",description:J[e].description,index:t,multiStep:M,headerProps:{className:(0,g.cn)("d-none d-lg-block",ei&&"text-white")},buttonProps:{disabled:"Vehicle Details"===W&&!K,className:"Rego Lookup"===W?"d-none":void 0},car:S,dark:ei,termsMessage:ea,resetForm:X,vehicleSearchError:$,recentSearchError:H,setSwitchToTradeIn:k,submitBtnText:j.qvG||j.ooc?"Enquire Now":j.zVb?"Submit Enquiry":j.e5n?"Accept Estimated Valuation Offer":"Accept Offer"},e)),(0,a.jsx)(C,{})]})]},"valuationForm")})}},11757:function(e,t,l){"use strict";l.d(t,{G:function(){return s},w:function(){return o}});var a=l(2265),i=l(38915),n=l(69645);function o(e){let[t,l]=(0,a.useState)(0),[n,o]=(0,a.useState)([]),[s,r]=(0,a.useState)(!1),[d,c]=(0,a.useState)({}),[u,m]=(0,a.useState)(null),[h,v]=(0,a.useState)(""),[f,p]=(0,a.useState)([]),x=(0,a.useCallback)(()=>{t<e.length-1&&(l(t+1),v(""),(n.length?n.filter(e=>e.from<t&&e.to>t):[]).length&&o(e=>e.filter(e=>!(e.from<t&&e.to>t))))},[n,t,e.length]),y=(0,a.useCallback)(()=>{if(t>0){let e=n.find(e=>e.to===t);e?l(e.from):l(e=>e-1)}},[n,t]),b=(0,a.useCallback)(e=>{o([...n,{from:t,to:e}]),l(e)},[n,t]),g=(0,a.useMemo)(()=>s?100:Math.round(t/e.length*100),[s,t,e.length]),j=(0,a.useMemo)(()=>e.length>1,[e.length]),w=(0,a.useCallback)(async function(e){let l=!(arguments.length>1)||void 0===arguments[1]||arguments[1];if(f.includes(t))return l&&x(),{error:!1};{let a={...e,lead_status:"Incomplete",form_completed:!1};u&&(a.lead_id=u);let n=await (0,i.c)({userData:a,isLastStep:!1,isMultiStep:!0});if(null==n?void 0:n.lead_id)return m(n.lead_id),p([...f,t]),l&&x(),{error:!1};if(null==n?void 0:n.error)return v(n.error),{error:!0}}},[u,x,t,f]);return(0,a.useMemo)(()=>({stepIndex:t,isFirstStep:0===t,isLastStep:t===e.length-1,isMultiStep:j,progress:g,formData:d,leadId:u,currentError:h,nextStep:x,previousStep:y,sendToServerOnStep:w,skipTo:b,setFormData:c,setLeadId:m,setProgressComplete:r,setCurrentError:v}),[h,d,j,u,x,y,g,w,b,t,e.length])}function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return{stepKeys:(0,n.RR)(e).filter(e=>!t.includes(e)),steps:(0,n.Cg)(e).filter(e=>!t.includes(e[0])).map(e=>e[1].fields)}}},2753:function(e,t,l){"use strict";l.r(t);var a=l(57437),i=l(90710),n=l.n(i),o=l(24232),s=l(55856);let r=(0,o.default)(()=>l.e(3975).then(l.bind(l,3975)).then(e=>e.NumericFormat),{loadableGenerated:{webpack:()=>[3975]}});t.default=(0,s.Z)({})(e=>{let{value:t,fieldState:l,formItem:i,placeholder:o,onChange:s,...d}=e;return(0,a.jsx)(r,{value:t,className:n()({"form-control":!0,"is-invalid":null==l?void 0:l.error}),displayType:"input",thousandSeparator:!0,placeholder:o||(null==i?void 0:i.name),onChange:s,...d})})},26582:function(e,t,l){"use strict";l.r(t);var a=l(57437),i=l(2265),n=l(82670),o=l(21180),s=l(31911),r=l(73799),d=l(13593);t.default=e=>{let{placeholder:t="Please select a dealership...",locations:l=o.default.locations,make:c,locationType:u,showCityName:m,hardcodedLocations:h,...v}=e,{setValue:f,watch:p}=(0,n.Gc)(),[x,y]=(0,i.useState)(!1),b=p("location_id"),g=(0,i.useMemo)(()=>{let e=null!=l?l:[];return c&&(e=e.filter(e=>e.manufacturers.includes(null==c?void 0:c.replace(" ","-")))),u&&(e=(0,s.eq)(e,u.toLowerCase())),h&&(null==h?void 0:h.length)>0&&(e=h),e.map(e=>({name:m?e.address.city:e.name,value:e.id}))},[h,u,l,c,m]);return((0,i.useEffect)(()=>{x||1!==g.length||(f("location_id",g[0].value),y(!0))},[x,g,f]),(0,i.useEffect)(()=>{r.n_n&&(0,s.qt)({locations:o.default.locations,locationId:b,setValue:f})},[b,l,f]),g&&0!==g.length)?(0,a.jsx)(d.default,{defaultValue:"",placeholder:t,options:g||[],...v,name:"location_id"}):null}},31827:function(e,t,l){"use strict";l.d(t,{p:function(){return u}});var a=l(57437),i=l(98594),n=l(15068),o=l(51091),s=l(69645),r=l(25076),d=l(94321),c=l(7364);function u(e){let{currentFields:t,heading:l,description:u,index:m,multiStep:h,car:v,model:f,headerProps:p,titleProps:x,descriptionProps:y,buttonProps:b,backButtonProps:g,cardContentClassName:j,submitBtnText:w,..._}=e,{currentError:N,showBtn:S,showBackBtn:k,isLastStep:C,previousStep:V,loading:D}=(0,c.K)({index:m,multiStep:h});return(0,a.jsxs)(a.Fragment,{children:[l||u?(0,a.jsxs)(o.Ol,{...p,children:[l&&(0,a.jsx)(o.ll,{...x,children:l}),u&&(0,a.jsx)(o.SZ,{...y,children:u.includes("<a")||u.includes("<strong")?(0,a.jsx)("span",{dangerouslySetInnerHTML:{__html:u}}):u})]}):(0,a.jsx)("div",{className:"pt-4"}),(0,a.jsxs)(o.aY,{className:j,children:[(0,a.jsx)(d.t,{currentFields:t,car:v,model:f,..._}),N&&(0,a.jsxs)(n.bZ,{variant:"destructive",className:"mt-3",children:[(0,a.jsx)(i.lEC,{size:16}),(0,a.jsx)(n.X,{children:N})]})]}),(0,a.jsxs)(o.eW,{className:"d-flex justify-content-between",children:[k?(0,a.jsx)("button",{...g,"data-testid":"multistep-back",disabled:D,type:"button",onClick:V,className:(0,s.cn)("btn btn-outline-primary mr-3",null==g?void 0:g.className),children:"Go Back"}):(0,a.jsx)("div",{}),S&&(0,a.jsx)(r.Mm,{...b,children:C?w||"Submit":"Continue"})]})]})}},7364:function(e,t,l){"use strict";l.d(t,{K:function(){return o}});var a=l(2265),i=l(82670),n=l(86153);function o(e){let{index:t,multiStep:l}=e,{currentError:o,stepIndex:s,isFirstStep:r,isLastStep:d,progress:c,previousStep:u}=l,m=t===s,h=m&&!r,{isLoadingSuccessPage:v}=(0,n.useGlobal)(),{isSubmitting:f}=(0,i.cl)(),p=f||v;return(0,a.useMemo)(()=>({currentError:o,stepIndex:s,showBtn:m,showBackBtn:h,isLastStep:d,progress:c,previousStep:u,loading:p}),[o,d,p,u,c,h,m,s])}},43218:function(e){e.exports={xs:"min-width: 400px",sm:"min-width: 576px","sm-down":"max-width: 576px",md:"min-width: 768px","md-down":"max-width: 768px",lg:"min-width: 992px","lg-down":"max-width: 992px",xl:"min-width: 1200px","xl-down":"max-width: 1200px",xxl:"min-width: 1400px",formContainer:"ValuationForm_formContainer__I4e4g",vehicleCheck:"ValuationForm_vehicleCheck__tx9s7",formBody:"ValuationForm_formBody__zTaFY",formWidth:"ValuationForm_formWidth__FaL34",searchButton:"ValuationForm_searchButton__MN9UT",exclusionMessage:"ValuationForm_exclusionMessage__plsLZ",ImNotSure:"ValuationForm_ImNotSure__PTpMf",stepHeading:"ValuationForm_stepHeading__EFtZD"}}}]);