1"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[2679],{92679:function(e,t,o){o.r(t),o.d(t,{FormDynamicVehicleLookup:function(){return y}});var a=o(63696),i=o(3369),s=o(91806),n=o(95777),r=o(97290),l=o(25350),u=o(65658),d=o(49317),c=o(86961),p=o(91976),m=o(43346),h=o(78887),f=o(46035),g=o(19443),C=o(19951),b=o(63866),L=o(72418),v=o(46232),I=o(59957),N=o(67428),O=o(91785);const y=e=>{let{stepShortName:t,handleErrors:o,handleValidityChange:y}=e;const{pricing:R}=(0,m.V)(),{enableWriteOffQuestion:V,requireRegoAndState:k}=R||{},{state:S,dispatch:E}=(0,p.a)(),{valuationVehicleInfo:F}=S,{isWriteOff:w,odometer:W,registration:Y,state:x,vehicleCondition:j,vehicleDescription:A}=F,{defaultLookup:T,odometerLabel:_,regoLookupEnabled:H,registrationLabel:q,stateLabel:K,vehicleConditionLabel:D,writeOffHeadingText:G,writeOffLabel:B}=u.j4,{0:U,1:M}=(0,a.useState)(!0),{0:Q,1:J}=(0,a.useState)(!H||T!==n.uy.byRegistration),X=e=>{"object"==typeof e&&(U&&M(!1),E({type:l.xL.SET_VALUATION_VEHICLE_INFO,payload:Object.assign({},e)}),S.formInteracted||E({type:l.xL.SET_FORM_INTERACTED,payload:!0}))},{search:z}=(0,i.useLocation)(),P=s.A.parse(z,{parseBooleans:!0}),Z=!0===P[l.xt.valuationSearch]&&U,$="valuationVehicleDescription";return(0,c.c)(o,$),(0,a.useEffect)((()=>{const e=!A;o((t=>Object.assign({},t,{[$]:e}))),y(Boolean(W&&A&&(!k||Y&&x)))}),[F]),(0,a.useEffect)((()=>{const e=Object.keys(P).reduce(((e,t)=>{const o=P[t]||"";return t===l.xt.valuationRego?Object.assign({},e,{registration:o.toString()}):t===l.xt.valuationState&&r.LK.includes(o.toString().toUpperCase())?Object.assign({},e,{state:o.toString().toUpperCase()}):t===l.xt.valuationCondition&&u.Sl[o]?Object.assign({},e,{vehicleCondition:o}):t!==l.xt.valuationOdometer||Number.isNaN(Number(o))?t===l.xt.valuationWriteOff&&"boolean"==typeof o&&V?Object.assign({},e,{isWriteOff:o}):e:Object.assign({},e,{odometer:o.toString()})}),{});Object.keys(e).length>0&&E({type:l.xL.SET_VALUATION_VEHICLE_INFO,payload:e})}),[]),(0,O.Y)(a.Fragment,null,(0,O.Y)(v.w,{otherInfo:F,defaultLookup:T,regoLookupEnabled:H,handleOtherInfoChange:X,setIsManualLookup:J,fsvlWrapperCustom:N.GB,fsvlHeadingIconCustom:N.yH,fsvlHeadingCustom:N.p5,fsvlFormWrapperCustom:N.qe,fsvlResultWrapperCustom:N.lW,fsvlFormRegoWrapperCustom:N.JG,fsvlBtnsWrapperCustom:N.tG,regoLookupIsAutomaticConfirm:!0,regoLookupIsAutomaticSearch:Z,isDynamicForm:!0}),A&&(0,O.Y)("div",{className:"classImFormInputRowGroup",css:h.uH},(0,O.Y)(b.RadioLabelGroupNestedControlled,{groupName:t+"VehicleCondition",options:u.HL,radioValue:j||"",radioValueKey:"vehicleCondition",handleChange:X,isRequired:!0,imFormRadiosRowCustom:N.iX,imFormRadioLabelCustom:N.aQ},D),(0,O.Y)("div",{className:"classImFormInputRow",css:h.lp},(0,O.Y)(C.InputLabelNestedControlled,{isRequired:!0,idName:t+"Odometer",typeName:"number",placeholder:"Odometer",inputValue:W||"",inputValueKey:"odometer",handleChange:X,validationRequired:!0,validateFieldType:"odometer",handleErrors:o},_)),k&&Q&&(0,O.Y)("div",{className:"classImFormInputRow",css:[h.lp,h.bW,""]},(0,O.Y)(C.InputLabelNestedControlled,{isRequired:!0,idName:t+"Registration",typeName:"text",placeholder:"Registration",inputValue:Y||"",inputValueKey:"registration",handleChange:X},q),(0,O.Y)(L.SelectLabelNestedControlled,{idName:t+"State",selectValue:x||"",selectValueKey:"state",handleChange:X,options:(0,d._I)(),isRequired:!0},K)),V&&(0,O.Y)("div",{css:I.hr},(0,O.Y)("div",{style:{width:"100%"},css:g.Lf},G),(0,O.Y)("div",{className:"classImFormInputRow",css:h.lp},(0,O.Y)(f.CheckboxLabelNestedControlled,{idName:t+"WriteOff",checkValue:w||!1,handleChange:X,checkValueKey:"isWriteOff"},B)))))}}}]);
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.