PageSourceSearch

https://www.arabiawheel.com/static/js/5512.dcbe93e0.chunk.js

js arabiawheel.com collected 2026-10-08 01:54:07 UTC 270,380 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkarabiawheel=self.webpackChunkarabiawheel||[]).push([[5512],{15977:(e,t,x)=>{x.d(t,{A:()=>s});var l=x(65043),a=x(70579);const s=e=>{let{bidspan:t}=e;const[x,s]=(0,l.useState)({}),[r,i]=(0,l.useState)(!1);return(0,l.useEffect)((()=>{if(!t)return;const e=new Date(t).getTime(),x=()=>{const t=(new Date).getTime(),x=e-t;if(x<=0)return i(!0),void clearInterval(l);const a=Math.floor(x/864e5),r=Math.floor(x/36e5%24),d=Math.floor(x/1e3/60%60),n=Math.floor(x/1e3%60);s({days:a,hours:r,minutes:d,seconds:n})},l=setInterval(x,1e3);return x(),()=>clearInterval(l)}),[t]),t?r?(0,a.jsx)("span",{className:"text-red-500",children:"Auction Ended"}):(0,a.jsxs)("span",{className:"xxxsm:text-sm xsm:text-[15px] sm:text-[16px] lg:text-sm xl:text-base 2xl:text-[19px] 3xl:text-xl 4xl:text-[23px] 5xl:text-[25px] 6xl:text-[28px] dark:text-gray-400",children:[x.days,"d ",x.hours,"h ",x.minutes,"m ",x.seconds,"s"]}):null}},94499:(e,t,x)=>{x.d(t,{A:()=>s});x(65043);var l=x(74117),a=x(70579);const s=()=>{const{t:e,i18n:t}=(0,l.Bd)();return(0,a.jsxs)("div",{className:"flex border-b dark:border-border-color w-[100%]  min-h-[10%] ",children:[(0,a.jsx)("div",{className:"".concat("ar"===t.language?"pr-[2%]":"pl-[2%]"," w-[25%]  flex items-center border-r dark:border-border-color h-full border-gray-200 uppercase font-bold font-sans text-gray-500 dark:text-gray-400 "),children:e("model year")}),(0,a.jsx)("div",{className:"".concat("ar"===t.language?"pr-[2%]":"pl-[2%]"," w-[25%] border-r dark:border-border-color h-full  flex items-center border-gray-200 uppercase font-bold font-sans text-gray-500 dark:text-gray-400"),children:e("make")}),(0,a.jsx)("div",{className:"".concat("ar"===t.language?"pr-[2%]":"pl-[2%]"," w-[25%] border-r dark:border-border-color h-full  flex items-center border-gray-200 uppercase font-bold font-sans text-gray-500 dark:text-gray-400"),children:e("model")}),(0,a.jsxs)("div",{className:"".concat("ar"===t.language?"pr-[2%]":"pl-[2%]"," w-[25%]  h-full  flex items-center  uppercase font-bold font-sans text-sm text-gray-500 dark:text-gray-400"),children:[e("version")," ",(0,a.jsx)("span",{className:"text-xs",children:e("optional")})]})]})}},33548:(e,t,x)=>{x(70579)},73066:(e,t,x)=>{x.d(t,{A:()=>i});var l=x(65043),a=x(14177),s=x(70579);const r={"Excellent Deal":{bg:"bg-green-500",ring:"ring-green-400",icon:"\ud83d\udd25",label:"Excellent Deal"},"Good Deal":{bg:"bg-green-400",ring:"ring-green-300",icon:"\u2705",label:"Good Deal"},"Fair Deal":{bg:"bg-yellow-400",ring:"ring-yellow-300",icon:"\u26a1",label:"Fair Price"},Overpriced:{bg:"bg-red-400",ring:"ring-red-300",icon:"\u26a0\ufe0f",label:"Above Market"}};function i(e){let{vehicleId:t,actualPrice:x}=e;const[i,d]=(0,l.useState)(null);if((0,l.useEffect)((()=>{t&&(0,a.O)(t).then(d).catch((()=>{}))}),[t]),!i)return null;const n=r[i.marketStatus]||r["Fair Deal"];x&&Math.round((x-i.estimatedPrice)/i.estimatedPrice*100);return(0,s.jsxs)("div",{className:"inline-flex items-center gap-1 text-white text-xs sm:text-xs font-semibold px-2 py-[3px] rounded-full ring-1 ".concat(n.bg," ").concat(n.ring," shadow-sm mt-1"),children:[(0,s.jsx)("span",{children:n.icon}),(0,s.jsx)("span",{children:n.label})]})}},95894:(e,t,x)=>{x.r(t),x.d(t,{default:()=>tt});var l=x(65043),a=x(60184),s=x(86213),r=x(91036),i=x(83003),d=x(54420),n=x(47196),o=x(6720),c=x(50423),p=x(74117),m=x(49367),u=x(73216),h=x(98587),g=x(58168),f=x(58387),v=x(90540),b=x(68606),w=x(34535),y=x(37864),j=x(645),N=x(88988),k=x(53677),C=x(67266),D=x(6803);const A=l.createContext();const S=l.createContext();var B=x(57056),z=x(32400);function F(e){return(0,z.Ay)("MuiTableCell",e)}const E=(0,B.A)("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]);var M=x(70579);const I=["align","className","component","padding","scope","size","sortDirection","variant"],L=(0,w.Ay)("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:x}=e;return[t.root,t[x.variant],t["size".concat((0,D.A)(x.size))],"normal"!==x.padding&&t["padding".concat((0,D.A)(x.padding))],"inherit"!==x.align&&t["align".concat((0,D.A)(x.align))],x.stickyHeader&&t.stickyHeader]}})((e=>{let{theme:t,ownerState:x}=e;return(0,g.A)({},t.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:t.vars?"1px solid ".concat(t.vars.palette.TableCell.border):"1px solid\n    ".concat("light"===t.palette.mode?(0,C.a)((0,C.X4)(t.palette.divider,1),.88):(0,C.e$)((0,C.X4)(t.palette.divider,1),.68)),textAlign:"left",padding:16},"head"===x.variant&&{color:(t.vars||t).palette.text.primary,lineHeight:t.typography.pxToRem(24),fontWeight:t.typography.fontWeightMedium},"body"===x.variant&&{color:(t.vars||t).palette.text.primary},"footer"===x.variant&&{color:(t.vars||t).palette.text.secondary,lineHeight:t.typography.pxToRem(21),fontSize:t.typography.pxToRem(12)},"small"===x.size&&{padding:"6px 16px",["&.".concat(E.paddingCheckbox)]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},"checkbox"===x.padding&&{width:48,padding:"0 0 0 4px"},"none"===x.padding&&{padding:0},"left"===x.align&&{textAlign:"left"},"center"===x.align&&{textAlign:"center"},"right"===x.align&&{textAlign:"right",flexDirection:"row-reverse"},"justify"===x.align&&{textAlign:"justify"},x.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(t.vars||t).palette.background.default})})),T=l.forwardRef((function(e,t){const x=(0,y.A)({props:e,name:"MuiTableCell"}),{align:a="inherit",className:s,component:r,padding:i,scope:d,size:n,sortDirection:o,variant:c}=x,p=(0,h.A)(x,I),m=l.useContext(A),u=l.useContext(S),v=u&&"head"===u.variant;let w;w=r||(v?"th":"td");let j=d;"td"===w?j=void 0:!j&&v&&(j="col");const N=c||u&&u.variant,k=(0,g.A)({},x,{align:a,component:w,padding:i||(m&&m.padding?m.padding:"normal"),size:n||(m&&m.size?m.size:"medium"),sortDirection:o,stickyHeader:"head"===N&&m&&m.stickyHeader,variant:N}),C=(e=>{const{classes:t,variant:x,align:l,padding:a,size:s,stickyHeader:r}=e,i={root:["root",x,r&&"stickyHeader","inherit"!==l&&"align".concat((0,D.A)(l)),"normal"!==a&&"padding".concat((0,D.A)(a)),"size".concat((0,D.A)(s))]};return(0,b.A)(i,F,t)})(k);let B=null;return o&&(B="asc"===o?"ascending":"descending"),(0,M.jsx)(L,(0,g.A)({as:w,ref:t,className:(0,f.A)(C.root,s),"aria-sort":B,scope:j,ownerState:k},p))}));function P(e){return(0,z.Ay)("MuiToolbar",e)}(0,B.A)("MuiToolbar",["root","gutters","regular","dense"]);const R=["className","component","disableGutters","variant"],q=(0,w.Ay)("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:x}=e;return[t.root,!x.disableGutters&&t.gutters,t[x.variant]]}})((e=>{let{theme:t,ownerState:x}=e;return(0,g.A)({position:"relative",display:"flex",alignItems:"center"},!x.disableGutters&&{paddingLeft:t.spacing(2),paddingRight:t.spacing(2),[t.breakpoints.up("sm")]:{paddingLeft:t.spacing(3),paddingRight:t.spacing(3)}},"dense"===x.variant&&{minHeight:48})}),(e=>{let{theme:t,ownerState:x}=e;return"regular"===x.variant&&t.mixins.toolbar})),V=l.forwardRef((function(e,t){const x=(0,y.A)({props:e,name:"MuiToolbar"}),{className:l,component:a="div",disableGutters:s=!1,variant:r="regular"}=x,i=(0,h.A)(x,R),d=(0,g.A)({},x,{component:a,disableGutters:s,variant:r}),n=(e=>{const{classes:t,disableGutters:x,variant:l}=e,a={root:["root",!x&&"gutters",l]};return(0,b.A)(a,P,t)})(d);return(0,M.jsx)(q,(0,g.A)({as:a,className:(0,f.A)(n.root,l),ref:t,ownerState:d},i))}));var _=x(10875),O=x(59662);const H=(0,O.A)((0,M.jsx)("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),W=(0,O.A)((0,M.jsx)("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");var U=x(17392),Y=x(67884),K=x(38354);const G=["backIconButtonProps","count","disabled","getItemAriaLabel","nextIconButtonProps","onPageChange","page","rowsPerPage","showFirstButton","showLastButton","slots","slotProps"],$=l.forwardRef((function(e,t){var x,l,a,s,r,i,d,n;const{backIconButtonProps:o,count:c,disabled:p=!1,getItemAriaLabel:m,nextIconButtonProps:u,onPageChange:f,page:v,rowsPerPage:b,showFirstButton:w,showLastButton:y,slots:j={},slotProps:N={}}=e,k=(0,h.A)(e,G),C=(0,_.I)(),D=null!=(x=j.firstButton)?x:U.A,A=null!=(l=j.lastButton)?l:U.A,S=null!=(a=j.nextButton)?a:U.A,B=null!=(s=j.previousButton)?s:U.A,z=null!=(r=j.firstButtonIcon)?r:K.A,F=null!=(i=j.lastButtonIcon)?i:Y.A,E=null!=(d=j.nextButtonIcon)?d:W,I=null!=(n=j.previousButtonIcon)?n:H,L=C?A:D,T=C?S:B,P=C?B:S,R=C?D:A,q=C?N.lastButton:N.firstButton,V=C?N.nextButton:N.previousButton,O=C?N.previousButton:N.nextButton,$=C?N.firstButton:N.lastButton;return(0,M.jsxs)("div",(0,g.A)({ref:t},k,{children:[w&&(0,M.jsx)(L,(0,g.A)({onClick:e=>{f(e,0)},disabled:p||0===v,"aria-label":m("first",v),title:m("first",v)},q,{children:C?(0,M.jsx)(F,(0,g.A)({},N.lastButtonIcon)):(0,M.jsx)(z,(0,g.A)({},N.firstButtonIcon))})),(0,M.jsx)(T,(0,g.A)({onClick:e=>{f(e,v-1)},disabled:p||0===v,color:"inherit","aria-label":m("previous",v),title:m("previous",v)},null!=V?V:o,{children:C?(0,M.jsx)(E,(0,g.A)({},N.nextButtonIcon)):(0,M.jsx)(I,(0,g.A)({},N.previousButtonIcon))})),(0,M.jsx)(P,(0,g.A)({onClick:e=>{f(e,v+1)},disabled:p||-1!==c&&v>=Math.ceil(c/b)-1,color:"inherit","aria-label":m("next",v),title:m("next",v)},null!=O?O:u,{children:C?(0,M.jsx)(I,(0,g.A)({},N.previousButtonIcon)):(0,M.jsx)(E,(0,g.A)({},N.nextButtonIcon))})),y&&(0,M.jsx)(R,(0,g.A)({onClick:e=>{f(e,Math.max(0,Math.ceil(c/b)-1))},disabled:p||v>=Math.ceil(c/b)-1,"aria-label":m("last",v),title:m("last",v)}
1,$,{children:C?(0,M.jsx)(z,(0,g.A)({},N.firstButtonIcon)):(0,M.jsx)(F,(0,g.A)({},N.lastButtonIcon))}))]}))}));var J=x(45879);function X(e){return(0,z.Ay)("MuiTablePagination",e)}const Z=(0,B.A)("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"]);var Q;const ee=["ActionsComponent","backIconButtonProps","className","colSpan","component","count","disabled","getItemAriaLabel","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","onPageChange","onRowsPerPageChange","page","rowsPerPage","rowsPerPageOptions","SelectProps","showFirstButton","showLastButton","slotProps","slots"],te=(0,w.Ay)(T,{name:"MuiTablePagination",slot:"Root",overridesResolver:(e,t)=>t.root})((e=>{let{theme:t}=e;return{overflow:"auto",color:(t.vars||t).palette.text.primary,fontSize:t.typography.pxToRem(14),"&:last-child":{padding:0}}})),xe=(0,w.Ay)(V,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:(e,t)=>(0,g.A)({["& .".concat(Z.actions)]:t.actions},t.toolbar)})((e=>{let{theme:t}=e;return{minHeight:52,paddingRight:2,["".concat(t.breakpoints.up("xs")," and (orientation: landscape)")]:{minHeight:52},[t.breakpoints.up("sm")]:{minHeight:52,paddingRight:2},["& .".concat(Z.actions)]:{flexShrink:0,marginLeft:20}}})),le=(0,w.Ay)("div",{name:"MuiTablePagination",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})({flex:"1 1 100%"}),ae=(0,w.Ay)("p",{name:"MuiTablePagination",slot:"SelectLabel",overridesResolver:(e,t)=>t.selectLabel})((e=>{let{theme:t}=e;return(0,g.A)({},t.typography.body2,{flexShrink:0})})),se=(0,w.Ay)(k.A,{name:"MuiTablePagination",slot:"Select",overridesResolver:(e,t)=>(0,g.A)({["& .".concat(Z.selectIcon)]:t.selectIcon,["& .".concat(Z.select)]:t.select},t.input,t.selectRoot)})({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8,["& .".concat(Z.select)]:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"}}),re=(0,w.Ay)(N.A,{name:"MuiTablePagination",slot:"MenuItem",overridesResolver:(e,t)=>t.menuItem})({}),ie=(0,w.Ay)("p",{name:"MuiTablePagination",slot:"DisplayedRows",overridesResolver:(e,t)=>t.displayedRows})((e=>{let{theme:t}=e;return(0,g.A)({},t.typography.body2,{flexShrink:0})}));function de(e){let{from:t,to:x,count:l}=e;return"".concat(t,"\u2013").concat(x," of ").concat(-1!==l?l:"more than ".concat(x))}function ne(e){return"Go to ".concat(e," page")}const oe=l.forwardRef((function(e,t){var x;const a=(0,y.A)({props:e,name:"MuiTablePagination"}),{ActionsComponent:s=$,backIconButtonProps:r,className:i,colSpan:d,component:n=T,count:o,disabled:c=!1,getItemAriaLabel:p=ne,labelDisplayedRows:m=de,labelRowsPerPage:u="Rows per page:",nextIconButtonProps:w,onPageChange:N,onRowsPerPageChange:k,page:C,rowsPerPage:D,rowsPerPageOptions:A=[10,25,50,100],SelectProps:S={},showFirstButton:B=!1,showLastButton:z=!1,slotProps:F={},slots:E={}}=a,I=(0,h.A)(a,ee),L=a,P=(e=>{const{classes:t}=e;return(0,b.A)({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},X,t)})(L),R=null!=(x=null==F?void 0:F.select)?x:S,q=R.native?"option":re;let V;n!==T&&"td"!==n||(V=d||1e3);const _=(0,J.A)(R.id),O=(0,J.A)(R.labelId);return(0,M.jsx)(te,(0,g.A)({colSpan:V,ref:t,as:n,ownerState:L,className:(0,f.A)(P.root,i)},I,{children:(0,M.jsxs)(xe,{className:P.toolbar,children:[(0,M.jsx)(le,{className:P.spacer}),A.length>1&&(0,M.jsx)(ae,{className:P.selectLabel,id:O,children:u}),A.length>1&&(0,M.jsx)(se,(0,g.A)({variant:"standard"},!R.variant&&{input:Q||(Q=(0,M.jsx)(j.Ay,{}))},{value:D,onChange:k,id:_,labelId:O},R,{classes:(0,g.A)({},R.classes,{root:(0,f.A)(P.input,P.selectRoot,(R.classes||{}).root),select:(0,f.A)(P.select,(R.classes||{}).select),icon:(0,f.A)(P.selectIcon,(R.classes||{}).icon)}),disabled:c,children:A.map((e=>(0,l.createElement)(q,(0,g.A)({},!(0,v.g)(q)&&{ownerState:L},{className:P.menuItem,key:e.label?e.label:e,value:e.value?e.value:e}),e.label?e.label:e)))})),(0,M.jsx)(ie,{className:P.displayedRows,children:m({from:0===o?0:C*D+1,to:-1===o?(C+1)*D:-1===D?o:Math.min(o,(C+1)*D),count:-1===o?-1:o,page:C})}),(0,M.jsx)(s,{className:P.actions,backIconButtonProps:r,count:o,nextIconButtonProps:w,onPageChange:N,page:C,rowsPerPage:D,showFirstButton:B,showLastButton:z,slotProps:F.actions,slots:E.actions,getItemAriaLabel:p,disabled:c})]})}))}));var ce=x(83002),pe=x(95321),me=x(56258),ue=x(73066);const he=()=>{const[e,t]=(0,l.useState)(null),[x,h]=(0,l.useState)(null),[g,f]=(0,l.useState)(null),v=Boolean(e),b=B
1oolean(x),w=()=>{t(null)},y=e=>{h(null),f(e)},[j,k]=(0,l.useState)([]),C=(0,l.useRef)(null),[D,A]=(0,l.useState)(!1),S=e=>{const t=[...j],x=t.indexOf(e);x>=0?t.splice(x,1):t.push(e),k(t),A(t.length===z.length),C.current&&(C.current.indeterminate=t.length>0&&t.length<z.length)},B=localStorage.getItem("automotors__UserData"),[z,F]=((0,i.d4)((e=>e.auth.usertoken)),(0,l.useState)([])),[E,I]=(0,l.useState)(!1),[L,T]=(0,l.useState)(1),[P,R]=(0,l.useState)(null),[q,V]=(0,l.useState)(null),[_,O]=(0,l.useState)(!1),[H,W]=(0,l.useState)({}),[U,Y]=(0,l.useState)(!1),[K,G]=(0,l.useState)(null),[$,J]=(0,l.useState)(""),X=(0,l.useRef)(null),Z=(0,u.zy)(),Q=(0,u.Zp)(),{t:ee,i18n:te}=(0,p.Bd)();(0,l.useEffect)((()=>{const e=localStorage.getItem("automotors__UserData");if(e){const t=(0,d.s)(e);W(t)}}),[]);const xe=new URLSearchParams(Z.search),le=parseInt(xe.get("page"),10)||1,ae=parseInt(xe.get("perPage"),10)||25,[se,re]=(0,l.useState)(le),[ie,de]=(0,l.useState)(ae);(0,l.useEffect)((()=>{re(le),de(ae)}),[Z.search]);const ne=(e,t)=>{window.scrollTo({top:0}),re(t+1);const x=new URLSearchParams(Z.search);x.set("page",t+1),x.set("perPage",ie),Q("".concat(Z.pathname,"?").concat(x.toString()))},he=e=>{const t=parseInt(e.target.value);de(t),re(1);const x=new URLSearchParams(Z.search);x.set("page","1"),x.set("perPage",t),Q("".concat(Z.pathname,"?").concat(x.toString()))},ge=(null===z||void 0===z?void 0:z.length)||0,{startPageIndex:fe,endPageIndex:ve}=(0,l.useMemo)((()=>{const e=ie*se-1;return{startPageIndex:ie*se-ie,endPageIndex:Math.min(e,ge-1)}}),[ge,ie,se]);(0,l.useEffect)((()=>{if(null!==H&&void 0!==H&&H.showroomid){(async()=>{I(!0),R(null);try{const e=await s.A.get("".concat("https://www.arabiawheel.com/automotor","/api/vehicles/showroomvehicles/").concat(H.showroomid));F(e.data)}catch(P){R("Error fetching vehicles."),r.oR.error("Error fetching data.")}finally{I(!1)}})()}}),[H,U]);const[be,we]=(0,l.useState)({statusVehicle:!1,id:null});if((0,l.useEffect)((()=>{const e=e=>{X.current&&!X.current.contains(e.target)&&we({statusVehicle:!1,id:null})};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[]),E)return(0,M.jsx)("div",{className:"w-full h-full grid min-h-screen place-items-center",children:(0,M.jsx)("div",{className:"animate-spin  rounded-full h-16 w-16  border-t-8 border-l-8   border-[#0173E9]"})});const ye=e=>{we((t=>({statusVehicle:e!==t.id||!t.statusVehicle,id:e}))),S(e)},je=async e=>{if(j.length>0)try{const e=j.map((e=>"id=".concat(e))).join("&");(await s.A.delete("".concat("https://www.arabiawheel.com/automotor","/api/vehicles/deletebyIds?").concat(e),{headers:{Authorization:"Bearer ".concat(B)}})).data&&(r.oR.success("Vehicle Deleted Successfully"),k([]),Y((e=>!e)))}catch(t){}else r.oR.info("Select at least one item")},Ne=z.filter((e=>{var t,x,l,a,s;const r=null===K||e.status===K,i=((null===(t=e.makeName)||void 0===t?void 0:t.toLowerCase())||"").includes($.toLowerCase())||((null===(x=e.modelName)||void 0===x?void 0:x.toLowerCase())||"").includes($.toLowerCase())||((null===(l=e.year)||void 0===l?void 0:l.toString().toLowerCase())||"").includes($.toLowerCase())||((null===(a=e.price)||void 0===a?void 0:a.toString().toLowerCase())||"").includes($)||((null===(s=e.cityName)||void 0===s?void 0:s.toLowerCase())||"").includes($.toLowerCase());return r&&i})).sort(((e,t)=>{if(!g)return 0;switch(g){case"date-desc":return new Date(t.addedDate)-new Date(e.addedDate);case"date-asc":return new Date(e.addedDate)-new Date(t.addedDate);case"price-asc":return(e.price||0)-(t.price||0);case"price-desc":return(t.price||0)-(e.price||0);default:return 0}}));return(0,M.jsxs)("div",{className:"md:p-2 min-h-screen  md:mx-3 md:mt-3 mb-8 bg-white dark:bg-dark-from",children:[(0,M.jsxs)(m.mg,{children:[(0,M.jsx)("title",{children:ee("dealerDashboardTitle")}),(0,M.jsx)("meta",{name:"description",content:ee("dealerDashboardDescription")}),(0,M.jsx)("meta",{name:"keywords",content:ee("dealerDashboardKeywords")}),(0,M.jsx)("meta",{name:"robots",content:"index, follow"}),(0,M.jsx)("meta",{name:"author",content:"Arabiawheel Team"}),(0,M.jsx)("meta",{name:"publisher",content:"Arabiawheel"}),(0,M.jsx)("link",{rel:"canonical",href:"http://localhost:3000/"}),(0,M.jsx)("meta",{name:"lang",content:te.language})]}),(0,M.jsxs)("div",{className:"mx-5 dark:bg-dark-from pt-5 pb-5 2xl:pb-7 4xl:pb-8 4xl:pt-6 5xl:pt-7 5xl:pb-9 flex flex-col gap-4 sm:flex-row sm:justify-between",children:[(0,M.jsx)("div",{className:"w-full sm:w-[40%]",children:(0,M.jsxs)("div",{className:"flex items-center border border-[#eff0f2] dark:border-light-border   px-2 4xl:px-[10px] 5xl:px-[14px] 6xl:px-[18px] py-[5px] xl:py-[6px] 3xl:py-[7px] 4xl
1:py-[9px] 5xl:py-[12px] 6xl:py-[14px] rounded-[4px] 3xl:rounded-[5px] focus-within:outline focus-within:outline-[#0173E9] focus-within:outline-2 ",children:[(0,M.jsx)("input",{type:"text",placeholder:ee("search list"),value:$,onChange:e=>J(e.target.value),className:"outline-none dark:bg-dark-from dark:text-main-heading-white  w-full px-2 py-[3px] 5xl:py-[4px]  text-xsm xsm:text-sm placeholder:xl:text-[15px] placeholder:2xl:text-base placeholder:3xl:text-lg placeholder:4xl:text-xl placeholder:5xl:text-[22px] placeholder:6xl:text-2xl placeholder:7xl:text-[27px] xl:text-[15px] 2xl:text-base 3xl:text-lg 4xl:text-xl 5xl:text-[22px] 6xl:text-2xl 7xl:text-[27px]"}),(0,M.jsx)(c.Mmj,{className:"text-[22px] 2xl:text-2xl 3xl:text-[28px] 4xl:text-[32px] 5xl:text-[36px] 6xl:text-[40px] text-[#616161]"})]})}),(0,M.jsxs)("div",{className:"flex gap-2 md:gap-3 xl:gap-4 2xl:gap-5",children:[(0,M.jsxs)("div",{onClick:e=>{t(e.currentTarget)},className:"flex items-center gap-2 text-[#32c98d] dark:text-[#1d7f66] border border-[#32c98d] dark:border-[#1d7f66] rounded-md px-3 2xl:px-[14px] 4xl:px-4 5xl:px-5 6xl:px-6 py-2 2xl:py-[10px] 5xl:py-[12px] cursor-pointer",children:[(0,M.jsx)(c.e$p,{className:"text-lg  xl:text-xl 2xl:text-[22px] 4xl:text-[26px] 5xl:text-[28px] 6xl:text-[33px]"}),(0,M.jsx)("span",{className:"text-sm xl:text-base 2xl:text-lg 4xl:text-[22px] 5xl:text-2xl 6xl:text-[28px]",children:ee("status")})]}),(0,M.jsxs)(pe.A,{anchorEl:e,open:v,onClose:w,TransitionComponent:me.A,transitionDuration:100,MenuListProps:{className:"bg-white dark:bg-cl-dashbord-bg text-[#333] dark:text-main-heading-white "},children:[(0,M.jsx)(N.A,{className:" xl:!text-lg 2xl:!text-xl 3xl:!text-[22px] 4xl:!text-2xl 5xl:!text-[26px] 6xl:!text-[30px] 4xl:!pb-3 5xl:!pb-4 5xl:!pt-3 6xl:!pb-5 6xl:!pt-4 \r ",onClick:()=>{G(!0),w()},children:ee("active")}),(0,M.jsx)(N.A,{className:" xl:!text-lg 2xl:!text-xl 3xl:!text-[22px] 4xl:!text-2xl 5xl:!text-[26px] 6xl:!text-[30px] 4xl:!pb-3 5xl:!pb-4 5xl:!pt-3 6xl:!pb-5 6xl:!pt-4\r ",onClick:()=>{G(!1),w()},children:ee("pending")}),(0,M.jsx)(N.A,{className:" xl:!text-lg 2xl:!text-xl 3xl:!text-[22px] 4xl:!text-2xl 5xl:!text-[26px] 6xl:!text-[30px] 4xl:!pb-3 5xl:!pb-4 5xl:!pt-3 6xl:!pb-5 6xl:!pt-4\r ",onClick:()=>{G(null),w()},children:ee("all")})]}),(0,M.jsxs)("div",{onClick:e=>{h(e.currentTarget)},className:"flex items-center gap-2 text-[#611bcb] border border-[#611bcb] rounded-md px-3 2xl:px-[14px]  4xl:px-4 5xl:px-5 6xl:px-6 py-2 2xl:py-[10px] 5xl:py-[12px] cursor-pointer",children:[(0,M.jsx)(ce.Km0,{className:"text-lg  xl:text-xl 2xl:text-[22px] 4xl:text-[26px] 5xl:text-[28px] 6xl:text-[33px]"}),(0,M.jsx)("span",{className:"text-sm xl:text-base 2xl:text-lg 4xl:text-[22px] 5xl:text-2xl 6xl:text-[28px]",children:ee("sort")})]}),(0,M.jsxs)(pe.A,{anchorEl:x,open:b,onClose:y,TransitionComponent:me.A,transitionDuration:100,MenuListProps:{className:"bg-white dark:bg-cl-dashbord-bg text-[#333] dark:text-main-heading-white "},children:[(0,M.jsx)(N.A,{className:" xl:!text-lg 2xl:!text-xl 3xl:!text-[22px] 4xl:!text-2xl 5xl:!text-[26px] 6xl:!text-[30px] 4xl:!pb-3 5xl:!pb-4 5xl:!pt-3 6xl:!pb-5 6xl:!pt-4",onClick:()=>y("date-desc"),children:ee("Updated Date: Recent First")}),(0,M.jsx)(N.A,{className:" xl:!text-lg 2xl:!text-xl 3xl:!text-[22px] 4xl:!text-2xl 5xl:!text-[26px] 6xl:!text-[30px] 4xl:!pb-3 5xl:!pb-4  6xl:!pb-5",onClick:()=>y("date-asc"),children:ee("Updated Date: Oldest First")}),(0,M.jsx)(N.A,{className:" xl:!text-lg 2xl:!text-xl 3xl:!text-[22px] 4xl:!text-2xl 5xl:!text-[26px] 6xl:!text-[30px] 4xl:!pb-3 5xl:!pb-4  6xl:!pb-5",onClick:()=>y("price-asc"),children:ee("Price: Low to High")}),(0,M.jsx)(N.A,{className:" xl:!text-lg 2xl:!text-xl 3xl:!text-[22px] 4xl:!text-2xl 5xl:!text-[26px] 6xl:!text-[30px] 4xl:!pb-3 5xl:!pb-4  6xl:!pb-5",onClick:()=>y("price-desc"),children:ee("Price: High to Low")})]}),(0,M.jsx)("div",{className:"flex items-center gap-2 border border-[#1C8EF2] bg-[#1C8EF2] text-white rounded-md px-3 2xl:px-[14px] 4xl:px-4 5xl:px-5 6xl:px-6 py-2 2xl:py-[10px] 5xl:py-[12px] cursor-pointer",children:(0,M.jsx)("span",{className:"text-sm xl:text-base 2xl:text-lg 4xl:text-[22px] 5xl:text-2xl 6xl:text-[28px]",onClick:()=>je(),children:ee("delete")})})]})]}),(0,M.jsx)("div",{className:"relative overflow-x-auto mx-5 dark:bg-dark-from  ",style:{contain:"inline-size"},children:(0,M.jsxs)("table",{className:"w-full mx-auto bg-white dark:bg-dark-from border dark:border-light-border mb-7",children:[(0,M.jsx)("thead",{className:"text-[17px] 2xl:text-xl 3xl:text-[22px] 4xl:text-2xl 5xl:text-[28px] 6xl:text-[32px] ",children:(0,M.jsxs)("tr",{className:"bg-gray-100 dark:bg-cl-dashbord-button dark:text-main-heading-white text-left text-[#0D0F19]/80",children:[(0,M.jsx)("th",{className:"".concat(window.isArabic?"text-right":" text-left"," w-[30px] py-3 3xl:py-4 5xl:py-6 6xl:py-7  ").concat(window.isArabic?"pr-6":"pl-6"),children:(0,M.jsx)("input",{ref:C,className:"w-4 h-4 2xl
1:w-5 2xl:h-5 4xl:w-6 4xl:h-6 5xl:h-7 5xl:w-7 6xl:h-8 6xl:w-8\n                  appearance-none cursor-pointer rounded-sm\n    border border-[#aaa] dark:border-light-border\n    bg-white dark:bg-cl-dashbord-bg\n    checked:bg-[#0173E9] dark:checked:bg-[#0173E9]\n    checked:border-transparent\n    relative transition-all duration-200\n    checked:before:content-['\u2714']\n    checked:before:absolute\n    checked:before:inset-0\n    checked:before:flex\n    checked:before:items-center\n    checked:before:justify-center\n    checked:before:text-white\n    checked:before:text-[13px] \n    2xl:checked:before:text-[14px]\n    3xl:checked:before:text-[16px]\n    4xl:checked:before:text-[17px]\n    5xl:checked:before:text-[20px]\n    6xl:checked:before:text-[22px]\n                  ",type:"checkbox",checked:D,onChange:()=>{if(D)k([]);else{const e=z.map((e=>e.vehicleid));k(e)}A(!D)}})}),(0,M.jsx)("th",{className:"".concat(window.isArabic?"text-right":" text-left"," w-[240px] py-3 3xl:py-4 5xl:py-6 6xl:py-7 px-6 font-semibold  "),children:ee("name")}),(0,M.jsx)("th",{className:"".concat(window.isArabic?"text-right":" text-left"," w-[140px] py-3 3xl:py-4 5xl:py-6 6xl:py-7 px-6 font-semibold"),children:ee("year")}),(0,M.jsx)("th",{className:"".concat(window.isArabic?"text-right":" text-left"," w-[150px]  py-3 3xl:py-4 5xl:py-6 6xl:py-7 px-6 font-semibold "),children:ee("price")}),(0,M.jsx)("th",{className:"".concat(window.isArabic?"text-right":" text-left"," w-[150px]  py-3 3xl:py-4 5xl:py-6 6xl:py-7 px-6 font-semibold"),children:"AI Estimate"}),(0,M.jsx)("th",{className:"".concat(window.isArabic?"text-right":" text-left"," w-[30px]  py-3 3xl:py-4 5xl:py-6 6xl:py-7 px-6 font-semibold"),children:ee("image")}),(0,M.jsx)("th",{className:"".concat(window.isArabic?"text-right":" text-left"," w-[120px]  py-3 3xl:py-4 5xl:py-6 6xl:py-7 px-6   font-semibold"),children:ee("status")}),(0,M.jsx)("th",{className:"".concat(window.isArabic?"text-right w-[190px] whitespace-nowrap":" text-left w-[170px] whitespace-nowrap","   py-3 3xl:py-4 5xl:py-6 6xl:py-7 px-6 font-semibold  "),children:ee("featured ads")}),(0,M.jsx)("th",{className:"".concat(window.isArabic?"text-right":" text-left"," w-[100px]  py-3 3xl:py-4 5xl:py-6 6xl:py-7  px-6 selection: "),children:ee("action")})]})}),(0,M.jsx)("tbody",{children:P?(0,M.jsx)("tr",{children:(0,M.jsx)("td",{colSpan:"7",className:"py-2 px-4 text-center text-red-500",children:P})}):Ne&&Ne.length>0?null===Ne||void 0===Ne?void 0:Ne.slice(fe,ve+1).map((e=>(0,M.jsxs)("tr",{className:"border-t dark:border-light-border cursor-pointer  ".concat(j.includes(e.vehicleid)?"bg-[#E2EFFD] hover:bg-blue-100 dark:bg-[#1F2934] dark:hover:bg-[#202E3D] ":"hover:bg-gray-100 dark:hover:bg-cl-dashbord-button"),children:[(0,M.jsx)("td",{className:"whitespace-nowrap py-3 3xl:py-4 5xl:py-6 6xl:py-7  w-[30px] text-[15px] 2xl:text-[17px] 3xl:text-[19px] 5xl:text-[23px] 6xl:text-[26px] text-[#616161] ".concat(window.isArabic?"pr-6":"pl-6"," "),children:(0,M.jsx)("input",{className:"w-4 h-4 2xl:w-5 2xl:h-5 4xl:w-6 4xl:h-6 5xl:h-7 5xl:w-7 6xl:h-8 6xl:w-8\n                        appearance-none cursor-pointer rounded-sm\n    border border-[#aaa] dark:border-light-border\n    bg-white dark:bg-cl-dashbord-bg\n    checked:bg-[#0173E9] dark:checked:bg-[#0173E9]\n    checked:border-transparent\n    relative transition-all duration-200\n    checked:before:content-['\u2714']\n    checked:before:absolute\n    checked:before:inset-0\n    checked:before:flex\n    checked:before:items-center\n    checked:before:justify-center\n    checked:before:text-white\n    checked:before:text-[13px] \n    2xl:checked:before:text-[14px]\n    3xl:checked:before:text-[16px]\n    4xl:checked:before:text-[17px]\n    5xl:checked:before:text-[20px]\n    6xl:checked:before:text-[22px] ",type:"checkbox",checked:j.includes(e.vehicleid),onChange:()=>S(e.vehicleid)})}),(0,M.jsxs)("td",{className:"whitespace-nowrap py-3 3xl:py-4 5xl:py-6 6xl:py-7 px-6 w-[240px] text-[15px] 2xl:text-[17px] 3xl:text-[19px] 5xl:text-[23px] 6xl:text-[26px] text-[#616161] dark:text-[#8a8a8a]   ",children:[ee(null!==e&&void 0!==e&&e.makeName?"Make.".concat((null===e||void 0===e?void 0:e.makeName)||"default"):"loading")," ",ee(null!==e&&void 0!==e&&e.modelName?"Model.".concat((null===e||void 0===e?void 0:e.modelName)||"default"):"loading")]}),(0,M.jsx)("td",{className:"whitespace-nowrap py-3 3xl:py-4 5xl:py-6 6xl:py-7 px-6 w-[140px] text-[15px] 2xl:text-[17px] 3xl:text-[19px] 5xl:text-[23px] 6xl:text-[26px] text-[#616161] dark:text-[#8a8a8a]   ",children:e.year}),(0,M.jsx)("td",{className:"py-3 3xl:py-4 5xl:py-6 6xl:py-7 px-6 w-[150px] text-[15px] 2xl:text-[17px] 3xl:text-[19px] 5xl:text-[23px] 6xl:text-[26px] text-[#616161] dark:text-[#8a8a8a] ",children:e.price}),(0,M.jsx)("td",{className:"py-3 3xl:py-4 5xl:py-6 6xl:py-7 px-6 w-[150px]",children:e.price&&!e.biddingVehicle&&(0,M.jsx)(ue.A,{vehicleId:e.vehicleid,actualPrice:e.price})}),(0,M.jsx)("td",{className:"py-3 3xl:py-4 5xl:py-6 6xl:py-7 w-[30px] ",children:(0,M.jsx)(a.Ny1,{className:"cursor-pointer text-blue-500 text-xl 2xl:text-[22px] 3xl:text-2xl 5xl:text-3xl 6xl:text-[33px] mx-auto",onClick:()=>{V(e.images[0]),O(!0)}})}),(0,M.jsx)("td",{className:"py-3 3xl:py-4 5xl:py-6 6xl:py-7 px-6 w-[120px] ",children:(0,M.jsxs)("div",{className:"flex items-center justify-center w-fit bg-gray-100 dark:bg-dark-from",children:[(0,M.jsx)("label",{htmlFor:e.vehicleid,className:"flex items-center cursor-pointer",children:(0,M.jsxs)("div",{className:"relative",children:[(0,M.jsx)("input",{type:"checkbox",id:e.vehicleid,checked:e.status,onChange:()=>(async(e,t)=>
1{if(e)try{if(200!==(await s.A.post("".concat("https://www.arabiawheel.com/automotor","/api/vehicles/updateDealervehiclestatus"),{vehicleId:e,Status:t?0:1},{headers:{Authorization:"Bearer ".concat(B)}})).status)throw new Error("Unexpected response status.");{const x=z.map((x=>x.vehicleid===e?{...x,status:!t}:x));F(x)}}catch(P){console.error("Error updating Feature Ads status:",P),P.response?(console.error("Response data:",P.response.data),console.error("Response status:",P.response.status),console.error("Response headers:",P.response.headers),R(P.response.data.message||"Failed to update Feature Ads status."),r.oR.error("Failed to update Feature Ads status: ".concat(P.response.data.message))):P.request?(console.error("Request made but no response received:",P.request),R("No response from server.")):(console.error("Error setting up the request:",P.message),R(P.message||"Failed to update Feature Ads status.")),r.oR.error("Error updating Feature Ads status.")}else console.error("Error: vehicleid is undefined. Please ensure it is passed correctly.")})(e.vehicleid,e.status),className:"sr-only"}),(0,M.jsx)("div",{className:"w-10 h-4 3xl:w-12 3xl:h-5 5xl:w-16 5xl:h-8 ".concat(e.status?"bg-green-400":"bg-gray-400"," rounded-full shadow-inner")}),(0,M.jsx)("div",{className:"dot absolute w-6 h-6 3xl:w-7 3xl:h-7 5xl:w-9 5xl:h-9 bg-white dark:bg-cl-dashbord-bg  rounded-full shadow -left-1 -top-1 transition ".concat(e.status?"transform translate-x-full":"")})]})}),(0,M.jsx)("style",{jsx:!0,children:"\n                          .dot {\n                            transition: transform 0.3s ease-in-out;\n                          }\n                        "})]})}),(0,M.jsx)("td",{className:"".concat(window.isArabic?" w-[190px]":" w-[170px]"," py-3 3xl:py-4 5xl:py-6 6xl:py-7 px-6  "),children:(0,M.jsxs)("div",{className:"flex items-center justify-center w-fit bg-gray-100 dark:bg-dark-from",children:[(0,M.jsx)("label",{htmlFor:e.id,className:"flex items-center cursor-pointer",children:(0,M.jsxs)("div",{className:"relative",children:[(0,M.jsx)("input",{type:"checkbox",id:e.vehicleid,checked:e.featureAds,onChange:()=>(async(e,t)=>{if(e)try{if(200!==(await s.A.post("".concat("https://www.arabiawheel.com/automotor","/api/vehicles/updatevehiclestatus"),{vehicleId:e,featureStatus:t?0:1},{headers:{Authorization:"Bearer ".concat(B)}})).status)throw new Error("Unexpected response status.");{const x=z.map((x=>x.vehicleid===e?{...x,featureAds:!t}:x));F(x)}}catch(P){if("Vehicle not found"===P.response.data.message)return void r.oR.error("Your Featured limit exceed");console.error("Error updating Feature Ads status:",P),P.response?(console.error("Response data:",P.response.data),console.error("Response status:",P.response.status),console.error("Response headers:",P.response.headers),R(P.response.data.message||"Failed to update Feature Ads status."),r.oR.error("Failed to update Feature Ads status: ".concat(P.response.data.message))):P.request?(console.error("Request made but no response received:",P.request),R("No response from server.")):(console.error("Error setting up the request:",P.message),R(P.message||"Failed to update Feature Ads status.")),r.oR.error("Error updating Feature Ads status.")}else console.error("Error: vehicleid is undefined. Please ensure it is passed correctly.")})(e.vehicleid,e.featureAds),className:"sr-only"}),(0,M.jsx)("div",{className:"w-10 h-4 3xl:w-12 3xl:h-5 5xl:w-16 5xl:h-8 ".concat(e.featureAds?"bg-green-400":"bg-gray-400"," rounded-full shadow-inner")}),(0,M.jsx)("div",{className:"dot absolute w-6 h-6 3xl:w-7 3xl:h-7 5xl:w-9 5xl:h-9 bg-white dark:bg-cl-dashbord-bg rounded-full shadow -left-1 -top-1 transition ".concat(e.featureAds?"transform translate-x-full":"")})]})}),(0,M.jsx)("style",{jsx:!0,children:"\n                          .dot {\n                            transition: transform 0.3s ease-in-out;\n                          }\n                        "})]})}),(0,M.jsxs)("td",{className:"py-3 3xl:py-4 5xl:py-6 6xl:py-7 px-6 relative w-[100px] ",children:[(0,M.jsxs)("button",{className:"text-[#611bcb] border border-[#611bcb] focus:outline-none flex items-center gap-1 rounded-[5px] px-3 4xl:px-[14px] 5xl:px-[16px] 6xl:px-[18px] py-[6px]  3xl:py-[7px] 4xl
1:py-[8px] 5xl:py-[9px] 6xl:py-[11px] ",onClick:()=>ye(e.vehicleid),children:[(0,M.jsx)("span",{className:"text-[14px] 2xl:text-[16px] 3xl:text-[18px] 4xl:text-xl 5xl:text-[22px] 6xl:text-[25px] ",children:ee("action")}),(0,M.jsx)(c.q2p,{className:" text-[22px] 2xl:text-[24px] 3xl:text-[26px] 4xl:text-[28px] 5xl:text-[31px] 6xl:text-[34px]"})]}),be.statusVehicle&&be.id===e.vehicleid&&(0,M.jsx)("div",{ref:X,className:"absolute ".concat(window.isArabic?" left-5":" right-5 ","  w-48 4xl:w-52 5xl:w-56 6xl:w-64  bg-white dark:bg-cl-dashbord-bg border border-gray-300 dark:border-light-border rounded-md shadow-lg z-10 "),children:(0,M.jsxs)("ul",{className:"py-2 3xl:py-3 5xl:py-4 6xl:py-5 flex flex-col 6xl:gap-1",children:[(0,M.jsxs)("li",{className:"px-4 py-2 hover:bg-gray-100 dark:hover:bg-cl-dashbord-button cursor-pointer flex items-center text-blue-500  3xl:text-lg 4xl:text-xl 5xl:text-2xl 6xl:text-[26px]",onClick:()=>{var t;ye(null),t=e.vehicleid,Q("/dealer/edit-car/".concat(t))},children:[(0,M.jsx)(o.V9M,{className:" ".concat("ar"===te.language?"ml-2":"mr-2","  3xl:text-xl 4xl:text-2xl 5xl:text-[27px] 6xl:text-[32px] ")}),ee("edit")]}),(0,M.jsxs)("li",{className:"px-4 py-2 hover:bg-gray-100 dark:hover:bg-cl-dashbord-button cursor-pointer flex items-center text-red-500 dark:text-red-700 3xl:text-lg 4xl:text-xl 5xl:text-2xl 6xl:text-[26px]",onClick:()=>{ye(null),je(e.vehicleid)},children:[(0,M.jsx)(n.HDo,{className:" ".concat("ar"===te.language?"ml-2":"mr-2"," 3xl:text-xl 4xl:text-2xl 5xl:text-[27px] 6xl:text-[32px] ")}),ee("delete")]})]})})]})]},e.vehicleid))):(0,M.jsx)("tr",{children:(0,M.jsx)("td",{colSpan:"7",className:"py-3 px-6 text-center",children:ee("no showroom vehicles available.")})})})]})}),(0,M.jsx)("div",{dir:"ltr",className:"flex justify-center  ",children:(0,M.jsxs)("div",{className:"flex justify-between items-center w-full ",children:[(0,M.jsx)(oe,{dir:window.directionTo,component:"div",count:ge,page:se-1,rowsPerPage:ie,onPageChange:ne,rowsPerPageOptions:[2,25,50],onRowsPerPageChange:he,labelRowsPerPage:(0,M.jsx)("span",{className:"text-[#616161] dark:text-main-heading-white font-medium text-sm xl:text-base 2xl:text-lg 3xl:text-xl 4xl:text-[22px] 5xl:text-2xl 6xl:text-[28px]",children:ee("rows per page:")}),showFirstButton:!1,showLastButton:!1,labelDisplayedRows:()=>null,ActionsComponent:()=>null,className:"ml-2 sm:ml-0",SelectProps:{MenuProps:{PaperProps:{sx:{"& .MuiMenuItem-root":{"@media (min-width: 1536px)":{fontSize:"1.5rem"},"@media (min-width: 1936px)":{fontSize:"1.7rem"},"@media (min-width: 2136px)":{fontSize:"2rem"},"@media (min-width: 2636px)":{fontSize:"2.25rem"}}}}}},sx:{"& .MuiSelect-select":{fontSize:{xs:"1rem",sm:"1.1rem",md:"1.2rem",lg:"1.3rem",xl:"1.4rem"},width:{xs:"25px",sm:"40px",md:"50px",lg:"50px",xl:"55px"},minWidth:{xs:"25px",sm:"40px",md:"50px",lg:"50px",xl:"55px"},"@media (min-width: 1736px)":{fontSize:"1.6rem",width:"55px",minWidth:"55px"},"@media (min-width: 1936px)":{fontSize:"1.7rem",width:"60px",minWidth:"60px"},"@media (min-width: 2136px)":{fontSize:"1.9rem",width:"65px",minWidth:"65px"},"@media (min-width: 2636px)":{fontSize:"2.1rem",width:"70px",minWidth:"70px"},paddingRight:"80px",display:"flex",justifyContent:"center",alignItems:"center",border:"1px solid #eff0f2",borderRadius:"6px",borderColor:e=>"dark"===e.palette.mode?"#444":"#414143",color:e=>"dark"===e.palette.mode?"black":"#EEFFFF"},"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiSvgIcon-root":{fontSize:{xs:"1.5rem",sm:"1.75rem",md:"2rem",lg:"2.25rem",xl:"2rem"},"@media (min-width: 1736px)":{fontSize:"2.25rem"},"@media (min-width: 1936px)":{fontSize:"2.5rem"},"@media (min-width: 2136px)":{fontSize:"2.9rem"},"@media (min-width: 2636px)":{fontSize:"3rem"},color:e=>"dark"===e.palette.mode?"black":"#414143"}}}),(0,M.jsx)(oe,{component:"div",count:ge,page:se-1,rowsPerPage:ie,onPageChange:ne,rowsPerPageOptions:[],onRowsPerPageChange:he,labelRowsPerPage:"",showFirstButton:!1,showLastButton:!1,className:"mr-2",sx:{"& .MuiTablePagination-displayedRows":{fontSize:{xs:"1rem",sm:"1.05rem",md:"1.1rem",lg:"1.3rem",xl:"1.4rem"},"@media (min-width: 1936px)":{fontSize:"1.8rem"},"@media (min-width: 2136px)":{fontSize:"1.9rem"},"@media (min-width: 2636px)":{fontSize:"2.1rem"},color:e=>"dark"===e.palette.mode?"black":"#EEFFFF"},"& .MuiSvgIcon-root":{fontSize:{xs:"1.25rem",sm:"1.6rem",md:"1.75rem",lg:"2rem",xl:"2.25rem"},"@media (min-width: 1936px)":{fontSize:"2.6rem"},"@media (min-width: 2136px)":{fontSize:"2.8rem"},"@media (min-width: 2636px)":{fontSize:"3rem"},color:e=>"dark"===e.palette.mode?"black":"#414143"}}})]})}),_&&(0,M.jsx)("div",{className:"fixed inset-0 bg-gray-600 bg-opacity-50 flex justify-center items-center",children:(0,M.jsxs)("div",{className:"\r bg-white dark:bg-cl-dashbord-bg p-4 rounded-lg \r w-[90%] sm:w-3/4 md:w-1/2 lg:w-1/3 xl:w-1/4 2xl:w-1/5\r max-w-[340px] sm:max-w-[430px] md:max-w-[530px] lg:max-w-[640px] \r ",children:[(0,M.jsxs)("div",{className:"flex justify-between  pb-2",children:[(0,M.jsx)("div",{}),(0,M.jsx)("button",{className:"text-gray-400  font-bold hover:bg-gray-100  px-2  rounded-md hover:text-black ",onClick:()=>O(!1),children:"X"})]}),(0,M.jsx)("img",{src:q,loading:"lazy",alt:"Vehicle",className:"w-full max-h-[80vh] object-contain"})]})})]})};
1var ge=x(32620),fe=x(22315),ve=x(61479),be=x(92021);const we="style_abc__Kc5Vh";var ye=x(94499),je=x(71110),Ne=x.n(je),ke=x(81028),Ce=x(45394);const De=()=>{var e,t,x,a,c,h,g,f,v,b,w,y,j,N,k,C,D,A,S,B,z,F,E,I,L,T,P,R,q,V,_,O,H,W,U,Y;const K=localStorage.getItem("automotors__UserData"),[G,$]=(0,l.useState)(""),[J,X]=(0,l.useState)(0),[Z,Q]=(0,l.useState)(""),[ee,te]=(0,l.useState)(""),[xe,le]=(0,l.useState)(""),[ae,se]=(0,l.useState)("Year"),[re,ie]=(0,l.useState)(!1),de=localStorage.getItem("automotors__UserData"),[ne,oe]=(0,l.useState)(!1),[ce,pe]=((0,i.d4)((e=>e.auth.usertoken)),(0,l.useState)({city:"",cityName:"",fuelTypeName:"",transmissionName:"",vehicleTypeName:"",colorId:"",priceVehicle:"",mileage:"",noOfAccident:"",noOfOwners:"",description:"",selectedYear:Number(G),id:null,biddingVehicle:!1,vehicleCategory:"",engine:{displacement:""},dimension:{numberofdoor:{id:null},numberofcylinder:{id:null}},fuelType:{id:null},vehicleType:{id:null},wheelDriveType:{id:null},transmission:{id:null},carVersionFeatures:[{id:1871,feature:{id:1},value:null},{id:1872,feature:{id:2},value:null},{id:1873,feature:{id:3},value:null},{id:1874,feature:{id:4},value:null},{id:1875,feature:{id:5},value:null},{id:1876,feature:{id:6},value:null},{id:1877,feature:{id:7},value:null},{id:1878,feature:{id:8},value:null},{id:1879,feature:{id:9},value:null},{id:1880,feature:{id:10},value:null},{id:1881,feature:{id:11},value:null},{id:1882,feature:{id:12},value:null},{id:1883,feature:{id:13},value:null},{id:1884,feature:{id:14},value:null},{id:1885,feature:{id:15},value:null},{id:1886,feature:{id:16},value:null},{id:1887,feature:{id:17},value:null},{id:1888,feature:{id:18},value:null},{id:1889,feature:{id:19},value:null},{id:1890,feature:{id:20},value:null},{id:1891,feature:{id:21},value:null},{id:1892,feature:{id:22},value:null},{id:1893,feature:{id:23},value:null},{id:1894,feature:{id:24},value:null},{id:1895,feature:{id:25},value:null},{id:1896,feature:{id:26},value:null},{id:1897,feature:{id:27},value:null},{id:1898,feature:{id:28},value:null},{id:1899,feature:{id:29},value:null},{id:1900,feature:{id:30},value:null},{id:1901,feature:{id:31},value:null},{id:1902,feature:{id:32},value:null},{id:1903,feature:{id:33},value:null},{id:1904,feature:{id:34},value:null},{id:1905,feature:{id:35},value:null},{id:1906,feature:{id:36},value:null},{id:1907,feature:{id:37},value:null},{id:1908,feature:{id:38},value:null},{id:1909,feature:{id:39},value:null},{id:1910,feature:{id:40},value:null},{id:1911,feature:{id:41},value:null},{id:1912,feature:{id:42},value:null},{id:1913,feature:{id:43},value:null},{id:1914,feature:{id:44},value:null},{id:1915,feature:{id:45},value:null},{id:1916,feature:{id:46},value:null},{id:1917,feature:{id:47},value:null},{id:1918,feature:{id:48},value:null},{id:1919,feature:{id:49},value:null},{id:1920,feature:{id:50},value:null},{id:1921,feature:{id:51},value:null},{id:1922,feature:{id:52},value:null},{id:1923,feature:{id:53},value:null},{id:1924,feature:{id:54},value:null},{id:1925,feature:{id:55},value:null},{id:1926,feature:{id:56},value:null},{id:1927,feature:{id:57},value:null},{id:1928,feature:{id:58},value:null},{id:1929,feature:{id:59},value:null},{id:1930,feature:{id:60},value:null},{id:1931,feature:{id:61},value:null},{id:1932,feature:{id:62},value:null},{id:1933,feature:{id:63},value:null},{id:1934,feature:{id:64},value:null},{id:1935,feature:{id:65},value:null}]})),{t:me,i18n:ue}=(0,p.Bd)(),[he,je]=(0,l.useState)(!1),[De,Ae]=(0,l.useState)(!1),[Se,Be]=(0,l.useState)([]);(0,l.useEffect)((()=>{window.scrollTo({top:0,behavior:"smooth"})}),[]);const[ze,Fe]=(0,l.useState)(!1),[Ee,Me]=(0,l.useState)([]),[Ie,Le]=(0,l.useState)([]),Te=()=>Ie.map(((e,t)=>(0,M.jsx)(ve.sx,{draggableId:"image-".concat(t),index:t,children:x=>(0,M.jsxs)("div",{className:"relative inline-block",ref:x.innerRef,...x.draggableProps,...x.dragHandleProps,children:[(0,M.jsx)("img",{loading:"lazy",src:URL.createObjectURL(e),alt:e.name,className:"h-16 w-16 2xl:h-28 2xl:w-32 3xl:w-36 4xl:w-40 4xl:h-32 5xl:w-44 6xl:w-48 6xl:h-36 object-cover rounded-lg"}),0===t&&(0,M.jsx)("span",{className:"absolute bottom-0 left-0 bg-red-500 text-white text-xs 2xl:text-sm 3xl:text-base 4xl:text-[19px] 5xl:text-[23px] 6xl:text-[27px] font-bold px-1 2xl:px-[6px] 3xl:px-2 4xl:px-[11px] 5xl:px-[14px] 5xl:py-1 py-0.5 rounded",children:"Main"}),(0,M.jsx)("button",{className:"absolute top-0 right-0 bg-black/70 text-white font-bold rounded-full p-1",onClick:()=>(e=>{const t=[...Ie];t.splice(e,1),Le(t)})(t),children:(0,M.jsx)(be.j55,{color:"white",className:"3xl:text-lg 4xl:text-[22px] 5xl:text-[25px] 6xl:text-[29px]"})})]})},t))),Pe=e=>{pe({...ce,selectedYear:Number(e)}),$(Number(e)),X(0),te(""),le("")},Re=e=>{Q(e.en),X(e.id),te(""),le("")},qe=[];for(let l=2026;l>=1940;l--)qe.push(l.toString());const Ve=[{features:"ABS",id:4,length:3},{features:"Air Bags",id:1,length:0},{features:"Air Conditioning",id:29,length:28},{features:"Alloy Rims",id:11,length:10},{features:"AM/FM Radio",id:64,length:63},{features:"CD Player",id:22,length:21},{features:"Cassette Player",id:65,length:64}
1,{features:"Cool Box",id:60,length:59},{features:"Cruise Control",id:44,length:43},{features:"Climate Control",id:30,length:29},{features:"DVD Player",id:23,length:22},{features:"Front Speakers",id:26,length:25},{features:"Front Camera",id:48,length:47},{features:"Heated Seats",id:56,length:55},{features:"Immobilizer Key",id:3,length:2},{features:"Keyless Entry",id:34,length:33},{features:"Navigation System",id:46,length:45},{features:"Power Locks",id:37,length:36},{features:"Power Mirrors",id:40,length:39},{features:"Power Steering",id:38,length:37},{features:"Power Windows",id:39,length:38},{features:"Rear Seat Entertainment",id:28,length:27},{features:"Rear AC Vents",id:51,length:50},{features:"Rear Speakers",id:27,length:26},{features:"Rear Camera",id:49,length:48},{features:"Sun Roof",id:15,length:14},{features:"Steering Switches",id:43,length:42},{features:"USB and Auxiliary Cable",id:24,length:23}],[_e,Oe]=(0,l.useState)(!1),He=(0,l.useRef)("null"),We=(0,l.useRef)("null"),Ue=(0,l.useRef)("null"),Ye=(0,l.useRef)(""),Ke=(0,l.useRef)("null"),Ge=(0,l.useRef)(null),$e=()=>{Oe(!1),te(""),X(""),$(""),le(""),se("Year"),Qe(""),lt(""),dt("")};(0,l.useEffect)((()=>(_e?document.addEventListener("mousedown",Je):document.removeEventListener("mousedown",Je),()=>{document.removeEventListener("mousedown",Je)})),[_e]),(0,l.useEffect)((()=>(document.body.style.overflow=_e?"hidden":"auto",()=>{document.body.style.overflow="auto"})),[_e]);const Je=e=>{(We.current&&!We.current.contains(e.target)&&He.current.contains(e.target)||Ue.current&&!Ue.current.contains(e.target)&&Ye.current.contains(e.target))&&Xe()},Xe=()=>Oe(!1),[Ze,Qe]=(0,l.useState)(""),et=ke.A.popular.filter((e=>e.name.en.toLowerCase().includes(Ze.toLowerCase()))),tt=ke.A.others.filter((e=>e.name.en.toLowerCase().includes(Ze.toLowerCase()))),[xt,lt]=(0,l.useState)(""),at=fe.default[J]||{popular:[],others:[]},st=at.popular.filter((e=>e.en.toLowerCase().includes(xt.toLowerCase()))),rt=at.others?at.others.filter((e=>e.en.toLowerCase().includes(xt.toLowerCase()))):[],[it,dt]=(0,l.useState)(""),nt=null===Se||void 0===Se?void 0:Se.filter((e=>e.name.toLowerCase().includes(it.toLowerCase()))),[ot,ct]=(0,l.useState)(""),pt=ke.A.popular.filter((e=>e.name.en.toLowerCase().includes(ot.toLowerCase()))),mt=ke.A.others.filter((e=>e.name.en.toLowerCase().includes(ot.toLowerCase()))),[ut,ht]=(0,l.useState)(""),gt=fe.default[J]||{popular:[],others:[]},ft=gt.popular.filter((e=>e.en.toLowerCase().includes(ut.toLowerCase()))),vt=gt.others?at.others.filter((e=>e.en.toLowerCase().includes(ut.toLowerCase()))):[],[bt,wt]=(0,l.useState)(""),yt=null===Se||void 0===Se?void 0:Se.filter((e=>e.name.toLowerCase().includes(bt.toLowerCase())));(0,l.useEffect)((()=>{ct("")}),[G]),(0,l.useEffect)((()=>{ht("")}),[J]),(0,l.useEffect)((()=>{wt("")}),[ee]);const jt=async e=>{le(""),te(e.en),je(!0);try{const t=await s.A.get("".concat("https://www.arabiawheel.com/automotor","/carVersions/model/").concat(e.id));if(null!==t&&void 0!==t&&t.data){const e="string"===typeof t.data?JSON.parse(t.data):t.data;Be(Array.isArray(e)&&e.length>0?e:[]),je(!1)}else Be([]),je(!1),r.oR.error("No car versions found for the selected model.")}catch(t){console.error("Error fetching car versions",t),je(!1),r.oR.error("Error fetching car versions. Please try again later."),Be([])}finally{je(!1)}},Nt=async e=>{var t,x,l,a;if(!e)return void console.error("Event object is undefined");ie(!0);const r=null!==(t=null===(x=e.target)||void 0===x?void 0:x.id)&&void 0!==t?t:e.id;if(r){try{const e=await s.A.get("".concat("https://www.arabiawheel.com/automotor","/carVersions/compare?ids=").concat(r));pe((t=>{var x;const l={...e.data[0]};return null!==l&&void 0!==l&&null!==(x=l.engine)&&void 0!==x&&x.displacement||oe(!0),l.carVersionFeatures&&0!==l.carVersionFeatures.length||(l.carVersionFeatures=[{id:1871,feature:{id:1},value:null},{id:1872,feature:{id:2},value:null},{id:1873,feature:{id:3},value:null},{id:1874,feature:{id:4},value:null},{id:1875,feature:{id:5},value:null},{id:1876,feature:{id:6},value:null},{id:1877,feature:{id:7},value:null},{id:1878,feature:{id:8},value:null},{id:1879,feature:{id:9},value:null},{id:1880,feature:{id:10},value:null},{id:1881,feature:{id:11},value:null},{id:1882,feature:{id:12},value:null},{id:1883,feature:{id:13},value:null},{id:1884,feature:{id:14},value:null},{id:1885,feature:{id:15},value:null},{id:1886,feature:{id:16},value:null},{id:1887,feature:{id:17},value:null},{id:1888,feature:{id:18},value:null},{id:1889,feature:{id:19},value:null},{id:1890,feature:{id:20},value:null},{id:1891,feature:{id:21},value:null},{id:1892,feature:{id:22},value:null},{id:1893,feature:{id:23},value:null},{id:1894,feature:{id:24},value:null},{id:1895,feature:{id:25},value:null},{id:1896,feature:{id:26},value:null},{id:1897,feature:{id:27},value:null},{id:1898,feature:{id:28},value:null},{id:1899,feature:{id:29},value:null},{id:1900,feature:{id:30},value:null},{id:1901,feature:{id:31},value:null},{id:1902,feature:{id:32},value:null},{id:1903,feature:{id:33},value:null},{id:1904,feature:{id:34},value:null},{id:1905,feature:{id:35},value:null},{id:1906,feature:{id:36},value:null},{id:1907,feature:{id:37},value:null},{id:1908,feature:{id:38},value:null},{id:1909,feature:{id:39},value:null},{id:1910,feature:{id:40},value:null},{id:1911,feature:{id:41},value:null},{id:1912,feature:{id:42},value:null},{id:1913,feature:{id:43},value:null},{id:1914,feature:{id:44},value:null},{id:1915,feature:{id:45},value:null},{id:1916,feature:{id:46},value:null},{id:1917,feature:{id:47},value:null},{id:1918,feature:{id:48},value:null},{id:1919,feature:{id:49},value:null},{id:1920,feature:{id:50},value:null},{id:1921,feature:{id:51},value:null},{id:1922,feature:{id:52},value:null},{id:1923,feature:{id:53},value:null},{id:1924,feature:{id:54},value:null},{id:1925,feature:{id:55},value:null},{id:1926,feature:{id:56},value:null},{id:1927,feature:{id:57},value:null},{id:1928,feature:{id:58},value:null},{id:1929,feature:{id:59},value:null},{id:1930,feature:{id:60},value:null},{id:1931,feature:{id:61},value:null},{id:1932,feature:{id:62},value:null},{id:1933,feature:{id:63},value:null},{id:1934,feature:{id:64},value:null},{id:1935,feature:{id:65},value:null}]),{...t,...l}}))}catch(i){console.error("Error fetching car versions:",i)}le(null!==(l=null===(a=e.target)||void 0===a?void 0:a.value)&&void 0!==l?l:e.name),Oe(!1)}else console.error("ID is undefined, event:",e)},kt=async e=>{ie(!0);const t=e.id;try{const e=await s.A.get("".concat("https://www.arabiawheel.com/automotor","/carVersions/compare?ids=").concat(t));pe((t=>{var x;const l={...e.data[0]};return null!==l&&void 0!==l&&null!==(x=l.engine)&&void 0!==x&&x.displacement||oe(!0),l.carVersionFeatures&&0!==l.carVersionFeatures.length||(l.carVersionFeatures=[{id:1871,feature:{id:1},value:null},{id:1872,feature:{id:2},value:null},{id:1873,feature:{id:3},value:null},{id:1874,feature:{id:4},value:null},{id:1875,feature:{id:5},value:null},{id:1876,feature:{id:6},value:null},{id:1877,feature:{id:7},value:null},{id:1878,feature:{id:8},value:null},{id:1879,feature:{id:9},value:null},{id:1880,feature:{id:10},value:null},{id:1881,feature:{id:11},value:null},{id:1882,feature:{id:12},value:null},{id:1883,feature:{id:13},value:null},{id:1884,feature:{id:14},value:null},{id:1885,feature:{id:15},value:null},{id:1886,feature:{id:16},value:null},{id:1887,feature:{id:17},value:null},{id:1888,feature:{id:18},value:null},{id:1889,feature:{id:19},value:null},{id:1890,feature:{id:20},value:null},{id:1891,feature:{id:21},value:null},{id:1892,feature:{id:22},value:null},{id:1893,feature:{id:23},value:null},{id:1894,feature:{id:24},value:null},{id:1895,feature:{id:25},value:null},{id:1896,feature:{id:26},value:null},{id:1897,feature:{id:27},value:null},{id:1898,feature:{id:28},value:null},{id:1899,feature:{id:29},value:null},{id:1900,feature:{id:30},value:null},{id:1901,feature:{id:31},value:null},{id:1902,feature:{id:32},value:null},{id:1903,feature:{id:33},value:null},{id:1904,feature:{id:34},value:null},{id:1905,feature:{id:35},value:null},{id:1906,feature:{id:36},value:null},{id:1907,feature:{id:37},value:null},{id:1908,feature:{id:38},value:null},{id:1909,feature:{id:39},value:null},{id:1910,feature:{id:40},value:null},{id:1911,feature:{id:41},value:null},{id:1912,feature:{id:42},value:null},{id:1913,feature:{id:43},value:null},{id:1914,feature:{id:44},value:null},{id:1915,feature:{id:45},value:null},{id:1916,feature:{id:46},value:null},{id:1917,feature:{id:47},value:null},{id:1918,feature:{id:48},value:null},{id:1919,feature:{id:49},value:null},{id:1920,feature:{id:50},value:null},{id:1921,feature:{id:51},value:null},{id:1922,feature:{id:52},value:null},{id:1923,feature:{id:53},value:null},{id:1924,feature:{id:54},value:null},{id:1925,feature:{id:55},value:null},{id:1926,feature:{id:56},value:null},{id:1927,feature:{id:57},value:null},{id:1928,feature:{id:58},value:null},{id:1929,feature:{id:59},value:null},{id:1930,feature:{id:60},value:null},{id:1931,feature:{id:61},value:null},{id:1932,feature:{id:62},value:null},{id:1933,feature:{id:63},value:null},{id:1934,feature:{id:64},value:null},{id:1935,feature:{id:65},value:null}]),{...t,...l}}))}catch(x){}le(e.name),Oe(!_e)},[Ct,Dt]=(0,l.useState)({}),[At,St]=(0,l.useState)(!1),[Bt,zt]=(0,l.useState)(!1),[Ft,Et]=(0,l.useState)(!1),{id:Mt}=(0,u.g)();(0,l.useEffect)((()=>{Mt&&It(Mt)}
1),[Mt]);const It=async()=>{try{const e=await s.A.get("".concat("https://www.arabiawheel.com/automotor","/api/vehicles/").concat(Mt));Dt(e.data)}catch(e){console.error("Error fetching data:",e)}},Lt=(0,u.Zp)(),[Tt,Pt]=(0,l.useState)(!1),[Rt,qt]=(0,l.useState)([]);(0,l.useEffect)((()=>(document.body.style.overflow=Tt?"hidden":"auto",()=>{document.body.style.overflow="auto"})),[Tt]),(0,l.useEffect)((()=>{if(Tt){const e=Ve.filter((e=>{var t;return null===ce||void 0===ce||null===(t=ce.carVersionFeatures)||void 0===t?void 0:t.some((t=>t.id===e.id&&"yes"===t.value))}));qt(e)}}),[Tt,Ve,ce]);(0,l.useEffect)((()=>{if(Ee.length>0){(async()=>{const e=Ct.images.length;if(Ee.length+e>8){const t=8-e;if(t<=0)return r.oR.warn("Images limit reached. Can't add more"),void Me([]);r.oR.warn("Images limit exceeded. Uploading first "+t+" images.");const x=Ee.slice(0,t);Me(x)}else var t=[...Ee];try{St(!0);const e=t.map((e=>new Promise(((t,x)=>{new(Ne())(e,{quality:.8,maxWidth:1e3,maxHeight:1200,mimeType:"image/webp",success:e=>t(e),error:e=>x(e)})})))),x=(await Promise.all(e)).map((e=>{const t=new FormData;return t.append("file",e),t.append("upload_preset","cxbzsn0g"),t.append("cloud_name","dtlrs3y1y"),t.append("folder","arabiaWheeldealerVehicle"),s.A.post("https://api.cloudinary.com/v1_1/dtlrs3y1y/image/upload",t)})),l=(await Promise.all(x)).map((e=>({cloudinary_src:e.data.url,cloud_id:e.data.public_id})));Dt((e=>{const t=[...(null===e||void 0===e?void 0:e.images)||[],...l];return{...e,images:t}})),Me([])}catch(x){console.error("Error uploading images:",x),St(!1)}finally{St(!1),zt(!0),setTimeout((()=>{zt(!1)}),1200)}})()}}),[Ee]),(0,l.useEffect)((()=>(document.body.style.overflow=_e?"hidden":"auto",()=>{document.body.style.overflow="auto"})),[_e]);return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(m.mg,{children:[(0,M.jsx)("title",{children:me("dealerAddCarTitle")}),(0,M.jsx)("meta",{name:"description",content:me("dealerAddCarDescription")}),(0,M.jsx)("meta",{name:"keywords",content:me("dealerAddCarKeywords")}),(0,M.jsx)("meta",{name:"robots",content:"index, follow"}),(0,M.jsx)("meta",{name:"author",content:"Arabiawheel Team"}),(0,M.jsx)("meta",{name:"publisher",content:"Arabiawheel"}),(0,M.jsx)("link",{rel:"canonical",href:"http://localhost:3000/"}),(0,M.jsx)("meta",{name:"lang",content:ue.language})]}),(0,M.jsxs)("div",{ref:Ke,className:"overflow-y-auto   ",children:[(0,M.jsx)("div",{className:" bg-white dark:bg-dark-from py-8 border-t-4 border-[#ececec] hover:border-t-4 hover:border-[#134D99] dark:border-input-bg  4xl:border-t-[6px] hover:4xl:border-t-[6px]  hover:shadow-lg",children:Mt?(0,M.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,M.jsxs)("div",{className:"md:flex justify-between w-[95%] mx-auto order-2 xxxsm:hidden",children:[(0,M.jsx)("div",{className:"text-[#333333] dark:text-main-heading-white font-bold text-[22px] 2xl:text-[26px] 3xl:text-[29px] 4xl:text-[32px] 5xl:text-[36px] 6xl:text-[39px] capitalize",children:me("update car")}),(0,M.jsx)("div",{className:"text-[#868686] font-bold text-[22px] uppercase"})]}),(0,M.jsxs)("div",{className:"grid  grid-cols-1 xl:grid-cols-2 xxxsm:w-[95%] md:w-[90%]  gap-x-6 gap-y-3 mx-auto pt-3 order-3",children:[(0,M.jsxs)("div",{className:"flex  flex-col gap-4",children:[(0,M.jsxs)("div",{className:"flex xxxsm:flex-col xxxsm:items-start xxxsm:gap-2 md:flex-row  md:items-center md:justify-between md:gap-0",children:[(0,M.jsxs)("label",{className:"font-semibold xxxsm:text-sm xxsm:text-[16px] sm:text-[17px] 2xl:text-[19px] 3xl:text-[22px] 4xl:text-[24px] 5xl:text-[27px] 6xl:text-[31px] text-[#3B3B3B] dark:text-main-heading-white",htmlFor:"City",children:[me("city"),(0,M.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,M.jsxs)("div",{className:"relative xxxsm:w-full md:w-[70%]",children:[(0,M.jsxs)("select",{onChange:e=>Dt({...Ct,city:Number(e.target.value)}),type:"text",id:"City",name:"City",className:"xxxsm:w-full appearance-none text-sm text-[#999999] border border-[#D8D8D8] py-2 px-3 2xl:py-3 4xl:py-[14px] 5xl:py-4 5xl:px-4 6xl:px-[18px] 6xl:py-[18px]  2xl:text-base 3xl:text-lg 4xl:text-xl 5xl:text-[23px] 6xl:text-[27px]  rounded-md hover:border-sky-400 dark:border-border-color dark:bg-input-bg dark:text-main-heading-white dark:placeholder-main-heading-white",children:[(0,M.jsx)("option",{selected:!(null!==Ct&&void 0!==Ct&&Ct.city),disabled:!0,children:me("select city")}),(0,M.jsx)("option",{selected:1==(null===Ct||void 0===Ct?void 0:Ct.city),value:"1",children:me("manama")}),(0,M.jsx)("option",{selected:4==(null===Ct||void 0===Ct?void 0:Ct.city),value:"4",children:me("muharraq")}),(0,M.jsx)("option",{selected:2==(null===Ct||void 0===Ct?void 0:Ct.city),value:"2",children:me("r
1iffa")}),(0,M.jsx)("option",{selected:5==(null===Ct||void 0===Ct?void 0:Ct.city),value:"5",children:me("isa town")}),(0,M.jsx)("option",{selected:3==(null===Ct||void 0===Ct?void 0:Ct.city),value:"3",children:me("sitra")}),(0,M.jsx)("option",{selected:13==(null===Ct||void 0===Ct?void 0:Ct.city),value:"13",children:me("City.hamala")}),(0,M.jsx)("option",{selected:14==(null===Ct||void 0===Ct?void 0:Ct.city),value:"14",children:me("City.arad")}),(0,M.jsx)("option",{selected:15==(null===Ct||void 0===Ct?void 0:Ct.city),value:"15",children:me("City.umm al hassam")}),(0,M.jsx)("option",{selected:16==(null===Ct||void 0===Ct?void 0:Ct.city),value:"16",children:me("City.budaiya")})]}),(0,M.jsx)("div",{className:"pointer-events-none absolute inset-y-0 flex items-center   ".concat("ar"===ue.language?"left-2":"right-2"),children:(0,M.jsx)("span",{className:"text-gray-500",children:(0,M.jsx)(o.q0c,{color:"#757575",className:"xxxsm:text-[24px] xsm:text-[27px] lg:text-[28px] 2xl:text-[30px] 3xl:text-[33px] 4xl:text-[36px] 5xl:text-[38px] 6xl:text-[43px]"})})})]})]}),(0,M.jsxs)("div",{className:"flex xxxsm:flex-col xxxsm:items-start xxxsm:gap-2 md:flex-row  md:items-center md:justify-between md:gap-0",children:[(0,M.jsxs)("label",{className:"font-semibold xxxsm:text-sm xxsm:text-[16px] sm:text-[17px] 2xl:text-[19px] 3xl:text-[22px] 4xl:text-[24px] 5xl:text-[27px] 6xl:text-[31px]   text-[#3B3B3B] dark:text-main-heading-white",htmlFor:"Color",children:[me("exterior color"),(0,M.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,M.jsxs)("div",{className:"relative xxxsm:w-full md:w-[70%]",children:[(0,M.jsxs)("select",{className:"xxxsm:w-full appearance-none text-[#999999] text-sm border border-[#D8D8D8] py-2 px-3 2xl:py-3 4xl:py-[14px] 5xl:py-4 5xl:px-4 6xl:px-[18px] 6xl:py-[18px]  2xl:text-base 3xl:text-lg 4xl:text-xl 5xl:text-[23px] 6xl:text-[27px]  rounded-md hover:border-sky-400 dark:border-border-color dark:bg-input-bg dark:text-main-heading-white dark:placeholder-main-heading-white",type:"text",id:"Color",name:"Exterior Color",onChange:e=>Dt({...Ct,colorId:Number(e.target.value)}),children:[(0,M.jsx)("option",{disabled:!0,selected:!(null!==Ct&&void 0!==Ct&&Ct.colorId),children:me("select color")}),(0,M.jsxs)("option",{selected:8==(null===Ct||void 0===Ct?void 0:Ct.colorId),value:8,children:[me("black")," "]}),(0,M.jsxs)("option",{selected:44==(null===Ct||void 0===Ct?void 0:Ct.colorId),value:44,children:[me("white")," "]}),(0,M.jsxs)("option",{selected:39==(null===Ct||void 0===Ct?void 0:Ct.colorId),value:39,children:[me("silver")," "]}),(0,M.jsx)("option",{selected:5==(null===Ct||void 0===Ct?void 0:Ct.colorId),value:5,children:me("blue")}),(0,M.jsx)("option",{selected:40==(null===Ct||void 0===Ct?void 0:Ct.colorId),value:40,children:me("sky blue")}),(0,M.jsx)("option",{selected:12==(null===Ct||void 0===Ct?void 0:Ct.colorId),value:12,children:me("bronze")}),(0,M.jsx)("option",{selected:14==(null===Ct||void 0===Ct?void 0:Ct.colorId),value:14,children:me("brown")}),(0,M.jsx)("option",{selected:19==(null===Ct||void 0===Ct?void 0:Ct.colorId),value:19,children:me("green")}),(0,M.jsx)("option",{selected:20==(null===Ct||void 0===Ct?void 0:Ct.colorId),value:20,children:me("grey")}),(0,M.jsx)("option",{selected:22==(null===Ct||void 0===Ct?void 0:Ct.colorId),value:22,children:me("indigo")}),(0,M.jsx)("option",{selected:28==(null===Ct||void 0===Ct?void 0:Ct.colorId),value:28,children:me("orange")}),(0,M.jsx)("option",{selected:31==(null===Ct||void 0===Ct?void 0:Ct.colorId),value:31,children:me("pink")}),(0,M.jsx)("option",{selected:32==(null===Ct||void 0===Ct?void 0:Ct.colorId),value:32,children:me("purple")}),(0,M.jsx)("option",{selected:33==(null===Ct||void 0===Ct?void 0:Ct.colorId),value:33,children:me("red")}),(0,M.jsx)("option",{selected:45==(null===Ct||void 0===Ct?void 0:Ct.colorId),value:45,children:me("yellow")}),(0,M.jsx)("option",{selected:48==(null===Ct||void 0===Ct?void 0:Ct.colorId),value:48,children:me("golden")})]}),(0,M.jsx)("div",{className:"pointer-events-none absolute inset-y-0 flex items-center   ".concat("ar"===ue.language?"left-2":"right-2"),children:(0,M.jsx)("span",{className:"text-gray-500",children:(0,M.jsx)(o.q0c,{color:"#757575",className:"xxxsm:text-[24px] xsm:text-[27px] lg:text-[28px] 2xl:text-[30px] 3xl:text-[33px] 4xl:text-[36px] 5xl:text-[38px] 6xl:text-[43px]"})})})]})]}),(0,M.jsxs)("div",{className:"xl:hidden xxxsm:flex xxxsm:flex-col xxxsm:items-start xx
1xsm:gap-2 md:flex-row  md:items-center md:justify-between md:gap-0",children:[(0,M.jsxs)("label",{className:"font-semibold xxxsm:text-sm xxsm:text-[16px] sm:text-[17px] 2xl:text-[19px] 3xl:text-[22px] 4xl:text-[24px] 5xl:text-[27px] 6xl:text-[31px]   text-[#3B3B3B] dark:text-main-heading-white",htmlFor:"CarInfo",children:[me("car info"),(0,M.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,M.jsx)("input",{className:"xxxsm:w-full md:w-[70%] cursor-pointer text-sm text-[#999999] border border-[#D8D8D8] py-2 px-3  2xl:py-[13px] 4xl:py-[15px] 5xl:py-[23px] 5xl:px-4 6xl:px-[18px] 6xl:py-[23px]  placeholder:2xl:text-base placeholder:3xl:text-lg  placeholder:4xl:text-xl  placeholder:5xl:text-[23px]  placeholder:6xl:text-[27px] 2xl:text-[15px] 3xl:text-[17px]  4xl:text-[19px]  5xl:text-[21px]  6xl:text-[23px]  rounded-md hover:border-sky-400 dark:border-border-color dark:bg-input-bg dark:text-main-heading-white dark:placeholder-main-heading-white",type:"text",id:"CarInfo",name:"CarInfo",placeholder:me("make/model/version"),readOnly:!0,value:"".concat(null===Ct||void 0===Ct?void 0:Ct.year," ").concat(null===Ct||void 0===Ct||null===(c=Ct.model)||void 0===c||null===(h=c.make)||void 0===h?void 0:h.name," ").concat(null===Ct||void 0===Ct||null===(g=Ct.model)||void 0===g?void 0:g.name," ").concat(null===Ct||void 0===Ct||null===(f=Ct.carVersion)||void 0===f?void 0:f.name)})]}),(0,M.jsxs)("div",{className:"flex xxxsm:flex-col xxxsm:items-start xxxsm:gap-2 md:flex-row  md:items-center md:justify-between md:gap-0",children:[(0,M.jsxs)("label",{className:"font-semibold xxxsm:text-sm xxsm:text-[16px] sm:text-[17px] 2xl:text-[19px] 3xl:text-[22px] 4xl:text-[24px] 5xl:text-[27px] 6xl:text-[31px]    text-[#3B3B3B] dark:text-main-heading-white",htmlFor:"Mileage",children:[me("mileage"),"(KM)",(0,M.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,M.jsxs)("div",{className:"flex xxxsm:w-full md:w-[70%]",children:[(0,M.jsx)("span",{className:"bg-gray-200 dark:bg-cl-dashbord-bg dark:text-main-heading-white w-[15%] h-11 2xl:h-[51px] 3xl:h-[54px] 4xl:h-[57px] 5xl:h-[63px] 6xl:h-[82px]  2xl:text-base 3xl:text-lg  4xl:text-xl  5xl:text-[23px]  6xl:text-[27px] grid place-items-center ".concat(window.isArabic?"rounded rounded-l-none":"rounded rounded-r-none"," "),children:"KM"}),(0,M.jsx)("input",{className:"border border-[#D8D8D8] py-2 px-3 2xl:py-[13px] 4xl:py-[13px] 5xl:py-[20px] 5xl:px-4 6xl:px-[18px] 6xl:py-[21px]  placeholder:2xl:text-base placeholder:3xl:text-lg  placeholder:4xl:text-xl  placeholder:5xl:text-[23px]  placeholder:6xl:text-[27px] 2xl:text-[15px] 3xl:text-[17px]  4xl:text-[19px]  5xl:text-[21px]  6xl:text-[23px] w-[85%] dark:border-border-color dark:bg-input-bg dark:text-main-heading-white dark:placeholder-main-heading-white ".concat(window.isArabic?"rounded rounded-r-none":"rounded rounded-l-none"," hover:border-sky-400"),type:"text",id:"Mileage",name:"Mileage",placeholder:me("mileage"),value:null!==(v=null===Ct||void 0===Ct?void 0:Ct.mileage)&&void 0!==v?v:"",onChange:e=>{const t=e.target.value;/^\d*$/.test(t)&&Dt({...Ct,mileage:t})},onBlur:()=>{Dt((e=>({...e,mileage:e.mileage?Number(e.mileage):0})))},onKeyDown:e=>{"e"!==e.key&&"E"!==e.key&&"+"!==e.key&&"-"!==e.key||e.preventDefault()}})]})]}),(0,M.jsxs)("div",{className:"flex xxxsm:flex-col xxxsm:items-start xxxsm:gap-2 md:flex-row  md:items-center md:justify-between md:gap-0",children:[(0,M.jsxs)("label",{className:"font-semibold xxxsm:text-sm xxsm:text-[16px] sm:text-[17px] 2xl:text-[19px] 3xl:text-[22px] 4xl:text-[24px] 5xl:text-[27px] 6xl:text-[31px] tracking-tighter    text-[#3B3B3B] dark:text-main-heading-white",htmlFor:"price",children:[me("price"),"(Rs)",(0,M.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,M.jsxs)("div",{className:"flex xxxsm:w-full md:w-[70%]",children:[(0,M.jsx)("span",{className:"bg-gray-200 dark:bg-cl-dashbord-bg dark:text-main-heading-white w-[15%] h-11 2xl:h-[51px] 3xl:h-[54px] 4xl:h-[57px] 5xl:h-[63px] 6xl:h-[82px]  2xl:text-base 3xl:text-lg  4xl:text-xl  5xl:text-[23px]  6xl:text-[27px] grid place-items-center ".concat(window.isArabic?"rounded rounded-l-none":"rounded rounded-r-none"),children:"BHD"}),(0,M.jsx)("input",{className:"border border-[#D8D8D8] py-2 px-3 2xl:py-[13px] 4xl:py-[13px] 5xl:py-[20px] 5xl:px-4 6xl:px-[18px] 6xl:py-[21px]  placeholder:2xl:text-base placeholder:3xl:text-lg  placeholder:4xl:text-xl  placeholder:5xl:text-[23px]  placeholder:6xl:text-[27px] 2xl:text-[15px] 3xl:text-[17px]  4xl:text-[19px]  5xl:text-[21px]  6xl:text-[23px] w-[85%] dark:border-border-color dark:bg-input-bg dark:text-main-heading-white dark:placeholder-main-heading-white ".concat(window.isArabic?"rounded rounded-r-none":"rounded rounded-l-none"," hover:border-sky-400"),type:"text",id:"price",name:"price",value:null!==(b=null===Ct||void 0===Ct?void 0:Ct.price)&&void 0!==b?b:"",placeholder:me("price"),onChange:e=>{const t=e.target.value;/^\d*$/.test(t)&&Dt({...Ct,price:t})},onBlur:()=>{Dt((e=>({...e,price:e.price?Number(e.price):0})))},onKeyDown:e=>{"e"!==e.key&&"E"!==e.key&&"+"!==e.key&&"-"!==e.key||e.preventDefault()}})]})]})]}),(0,M.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,M.jsxs)("div",{className:"xxxsm:hidden xl:flex xxxsm:flex-col xxxsm:items-start xx
1xsm:gap-2 md:flex-row  md:items-center md:justify-between md:gap-0",children:[(0,M.jsxs)("label",{className:"font-semibold xxxsm:text-sm xxsm:text-[16px] sm:text-[17px] 2xl:text-[19px] 3xl:text-[22px] 4xl:text-[24px] 5xl:text-[27px] 6xl:text-[31px]   text-[#3B3B3B] dark:text-main-heading-white",htmlFor:"CarInfo",children:[me("car info"),(0,M.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,M.jsx)("input",{className:"xxxsm:w-full md:w-[70%] cursor-pointer text-sm text-[#999999] border border-[#D8D8D8] py-2 px-3  2xl:py-[13px] 4xl:py-[15px] 5xl:py-[23px] 5xl:px-4 6xl:px-[18px] 6xl:py-[23px]  placeholder:2xl:text-base placeholder:3xl:text-lg  placeholder:4xl:text-xl  placeholder:5xl:text-[23px]  placeholder:6xl:text-[27px] 2xl:text-[15px] 3xl:text-[17px]  4xl:text-[19px]  5xl:text-[21px]  6xl:text-[23px]  rounded-md hover:border-sky-400 dark:border-border-color dark:bg-input-bg dark:text-main-heading-white dark:placeholder-main-heading-white",type:"text",id:"CarInfo",name:"CarInfo",placeholder:me("make/model/version"),readOnly:!0,value:"".concat(null===Ct||void 0===Ct?void 0:Ct.year," ").concat(null===Ct||void 0===Ct||null===(w=Ct.model)||void 0===w||null===(y=w.make)||void 0===y?void 0:y.name," ").concat(null===Ct||void 0===Ct||null===(j=Ct.model)||void 0===j?void 0:j.name," ").concat(null===Ct||void 0===Ct||null===(N=Ct.carVersion)||void 0===N?void 0:N.name)})]}),(0,M.jsxs)("div",{className:"flex xxxsm:flex-col xxxsm:items-start xxxsm:gap-2 md:flex-row  md:items-center md:justify-between md:gap-0",children:[(0,M.jsxs)("label",{className:"font-semibold tracking-tighter capitalize xxxsm:text-sm xxsm:text-[16px] sm:text-[17px] 2xl:text-[19px] 3xl:text-[22px] 4xl:text-[24px] 5xl:text-[27px] 6xl:text-[31px]    text-[#3B3B3B] dark:text-main-heading-white",htmlFor:"Numberofowners",children:[me("no of owners"),(0,M.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,M.jsx)("input",{className:"xxxsm:w-full md:w-[70%] cursor-pointer border border-[#D8D8D8] py-2 px-3 2xl:py-[13px] 4xl:py-[13px] 5xl:py-[20px] 5xl:px-4 6xl:px-[18px] 6xl:py-[21px]  placeholder:2xl:text-base placeholder:3xl:text-lg  placeholder:4xl:text-xl  placeholder:5xl:text-[23px]  placeholder:6xl:text-[27px] 2xl:text-[15px] 3xl:text-[17px]  4xl:text-[19px]  5xl:text-[21px]  6xl:text-[23px] rounded-md hover:border-sky-400 dark:border-border-color dark:bg-input-bg dark:text-main-heading-white dark:placeholder-main-heading-white",type:"text",id:"Numberofowners",name:"Numberofowners",value:null!==(k=null===Ct||void 0===Ct?void 0:Ct.numberOfOwners)&&void 0!==k?k:"",placeholder:me("no of owners"),onChange:e=>{const t=e.target.value;/^\d*$/.test(t)&&Dt({...Ct,numberOfOwners:t})},onBlur:()=>{Dt((e=>({...e,numberOfOwners:e.numberOfOwners?Number(e.numberOfOwners):0})))},onKeyDown:e=>{"e"!==e.key&&"E"!==e.key&&"+"!==e.key&&"-"!==e.key||e.preventDefault()}})]}),(0,M.jsxs)("div",{className:"flex xxxsm:flex-col xxxsm:items-start xxxsm:gap-2 md:flex-row md:items-center md:justify-between md:gap-0",children:[(0,M.jsxs)("label",{className:"font-semibold tracking-tighter capitalize xxxsm:text-sm xxsm:text-[16px] sm:text-[17px] 2xl:text-[19px] 3xl:text-[22px] 4xl:text-[24px] 5xl:text-[27px] 6xl:text-[31px] text-[#3B3B3B] dark:text-main-heading-white",htmlFor:"Numberofaccidents",children:[me("no of accidents"),(0,M.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,M.jsx)("input",{className:"xxxsm:w-full md:w-[70%] cursor-pointer border border-[#D8D8D8] py-2 px-3 2xl:py-[13px] 4xl:py-[13px] 5xl:py-[20px] 5xl:px-4 6xl:px-[18px] 6xl:py-[21px]  placeholder:2xl:text-base placeholder:3xl:text-lg  placeholder:4xl:text-xl  placeholder:5xl:text-[23px]  placeholder:6xl:text-[27px] 2xl:text-[15px] 3xl:text-[17px]  4xl:text-[19px]  5xl:text-[21px]  6xl:text-[23px] rounded-md hover:border-sky-400 dark:border-border-color dark:bg-input-bg dark:text-main-heading-white dark:placeholder-main-heading-white",type:"text",id:"Numberofaccidents",name:"Numberofaccidents",value:(null===Ct||void 0===Ct?void 0:Ct.numberOfAccidents)||"",placeholder:me("no of accidents"),onChange:e=>{const t=e.target.value;/^\d*$/.test(t)&&Dt({...Ct,numberOfAccidents:t})}})]})]})]}),(0,M.jsxs)("div",{className:"xxxsm:w-[95%] md:w-[90%] lg:w-[90%] mx-auto  order-4 flex xxxsm:flex-col xxxsm:items-start xx
1xsm:gap-2 xl:flex-row  xl:justify-between xl:items-center xl:gap-0",children:[(0,M.jsxs)("label",{className:"flex items-center font-semibold xxxsm:text-sm xxsm:text-[16px] sm:text-[17px] 2xl:text-[19px] 3xl:text-[22px] 4xl:text-[24px] 5xl:text-[27px] 6xl:text-[31px]   text-[#3B3B3B] dark:text-main-heading-white",htmlFor:"Ad",children:[me("add description"),(0,M.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,M.jsx)("textarea",{placeholder:me("describe your car"),className:"xxxsm:w-full xl:w-[83%]  border border-[#D8D8D8] pt-7 px-3 2xl:pt-9 2xl:py-4 4xl:py-5 4xl:pt-11 5xl:py-6 5xl:pt-14 6xl:py-9 6xl:pt-16  placeholder:2xl:text-base placeholder:3xl:text-lg  placeholder:4xl:text-xl  placeholder:5xl:text-[23px]  placeholder:6xl:text-[27px] 2xl:text-[15px] 3xl:text-[17px]  4xl:text-[19px]  5xl:text-[21px]  6xl:text-[23px] rounded-md hover:border-sky-400 dark:border-border-color dark:bg-input-bg dark:text-main-heading-white dark:placeholder-main-heading-white",type:"text",id:"Ad",name:"Ad",value:null===Ct||void 0===Ct?void 0:Ct.description,onChange:e=>Dt({...Ct,description:e.target.value})})]}),(0,M.jsxs)("div",{className:"border-2 order-1 md:order-4  flex flex-col items-center justify-center gap-3 border-dotted border-blue-200 xxxsm:w-[95%] md:w-[90%] mx-auto",children:[(0,M.jsxs)("div",{className:"flex flex-col gap-1 justify-center items-center",children:[(0,M.jsxs)("div",{className:"flex justify-center  gap-4 mt-6 2xl:mt-7 3xl:mt-8 3xl:mb-2 5xl:mt-10 5xl:mb-3",children:[(0,M.jsx)("img",{loading:"lazy",src:"/placeholderpic.jpeg",alt:"pic icon",className:"xxxsm:size-8 xxsm:size-9 sm:size-10  md:size-11 2xl:size-12 3xl:size-14 4xl:size-16 5xl:size-20 "}),(0,M.jsx)("label",{htmlFor:"image",className:" bg-blue-500 cursor-pointer text-white xxxsm:text-[13px] xxsm:text-sm sm:text-[15px] md:text-[16px] xxxsm:px-2  md:px-3 py-1 2xl:px-4 3xl:px-6 5xl:px-7 6xl:px-8  3xl:text-[17px] 4xl:text-lg 5xl:text-[22px] 6xl:text-2xl 3xl:rounded-md  flex justify-center items-center rounded-sm  ",style:{pointerEvents:At?"none":"auto"},children:At?(0,M.jsxs)(M.Fragment,{children:[me("uploading photos")," \xa0",(0,M.jsx)("img",{src:"https://res.cloudinary.com/dtlrs3y1y/image/upload/v1755092092/uploading-image-for-update_qw9t2m.webp",width:30,height:30,alt:"Uploading"})]}):(0,M.jsx)(M.Fragment,{children:me(Bt?"completed":"add photo")})}),(0,M.jsx)("input",{type:"file",accept:"image/*",multiple:!0,onChange:e=>{const t=Array.from(e.target.files).slice(0,8);Me([...Ie,...t])},className:"hidden",id:"image"})]}),(0,M.jsx)("p",{className:"text-xs text-center mb-2 text-gray-400 2xl:text-sm 4xl:text-[15px] 5xl:text-lg 6xl:text-xl   ".concat(window.isArabic?"mr-12":"ml-12"),children:me("(max limit 8 images to upload)")})]}),(0,M.jsx)("div",{className:"flex w-[99%] flex-wrap md:flex-nowrap gap-2 items-center justify-center mx-auto mb-1",children:(()=>{var e;return null===Ct||void 0===Ct||null===(e=Ct.images)||void 0===e?void 0:e.map(((e,t)=>(0,M.jsxs)("div",{className:"relative inline-block ",children:[(0,M.jsx)("img",{src:e.cloudinary_src,loading:"lazy",alt:"Car 1",className:"h-16 w-1/[8] 2xl:h-28 2xl:w-32 3xl:w-36 4xl:w-40 4xl:h-32 5xl:w-44 6xl:w-48 6xl:h-36  object-cover rounded-lg"}),(0,M.jsx)("button",{className:"absolute top-0 right-0 bg-black/70 text-white font-bold rounded-full p-1",onClick:()=>{return e=t,void Dt((t=>{const x=t.images.filter(((t,x)=>x!==e));return{...t,images:x}}));var e},children:(0,M.jsx)(be.j55,{color:"white",fontWeight:"bold"})})]},t)))})()})]})]}):(0,M.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,M.jsxs)("div",{className:"md:flex justify-between w-[95%] mx-auto order-2 xxxsm:hidden",children:[(0,M.jsx)("div",{className:"text-[#333333] dark:text-main-heading-white font-bold text-[22px] 2xl:text-[26px] 3xl:text-[29px] 4xl:text-[32px] 5xl:text-[36px] 6xl:text-[39px] capitalize",children:me("car information")}),(0,M.jsx)("div",{className:"text-[#868686] font-bold text-[22px] uppercase"})]}),(0,M.jsxs)("div",{className:"grid  grid-cols-1 xl:grid-cols-2 xxxsm:w-[95%] md:w-[90%]  gap-x-6 gap-y-3 mx-auto pt-3 order-3",children:[(0,M.jsxs)("div",{className:"flex  flex-col gap-4",children:[(0,M.jsxs)("div",{className:"relative flex xxxsm:flex-col xxxsm:items-start xx
1xsm:gap-2 md:flex-row  md:items-center md:justify-between md:gap-0",children:[(0,M.jsxs)("label",{className:"font-semibold xxxsm:text-sm xxsm:text-[16px] sm:text-[17px]  2xl:text-[19px] 3xl:text-[22px] 4xl:text-[24px] 5xl:text-[27px] 6xl:text-[31px] text-[#3B3B3B] dark:text-main-heading-white",htmlFor:"City",children:[me("city"),(0,M.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,M.jsxs)("div",{className:"relative xxxsm:w-full md:w-[70%]",children:[(0,M.jsxs)("select",{onChange:e=>pe({...ce,city:Number(e.target.value),cityName:e.target.options[e.target.selectedIndex].dataset.name}),type:"text",id:"City",name:"City",className:"appearance-none xxxsm:w-full  text-sm text-[#999999] border border-[#D8D8D8] py-2 px-3 2xl:py-3 4xl:py-[14px] 5xl:py-4 5xl:px-4 6xl:px-[18px] 6xl:py-[18px]  2xl:text-base 3xl:text-lg 4xl:text-xl 5xl:text-[23px] 6xl:text-[27px]  rounded-md hover:border-sky-400 dark:border-border-color dark:bg-input-bg dark:text-main-heading-white dark:placeholder-main-heading-white",children:[(0,M.jsx)("option",{selected:ce.city.length<1,disabled:!0,children:me("select city")}),(0,M.jsx)("option",{"data-name":"Manama,Bahrain",value:"1",children:me("City.manama")}),(0,M.jsx)("option",{"data-name":"Muharraq,Bahrain",value:"4",children:me("City.muharraq")}),(0,M.jsx)("option",{"data-name":"Riffa,Bahrain",value:"2",children:me("City.riffa")}),(0,M.jsx)("option",{"data-name":"Isa Town,Bahrain",value:"5",children:me("City.isa town")}),(0,M.jsx)("option",{"data-name":"Sitra,Bahrain",value:"3",children:me("City.sitra")}),(0,M.jsx)("option",{"data-name":"Hamala,Bahrain",value:"13",children:me("City.hamala")}),(0,M.jsx)("option",{"data-name":"Arad,Bahrain",value:"14",children:me("City.arad")}),(0,M.jsx)("option",{"data-name":"Umm Al Hassam,Bahrain",value:"15",children:me("City.umm al hassam")}),(0,M.jsx)("option",{"data-name":"Budaiya,Bahrain",value:"16",children:me("City.budaiya")})]}),(0,M.jsx)("div",{className:"pointer-events-none absolute inset-y-0 flex items-center   ".concat("ar"===ue.language?"left-2":"right-2"),children:(0,M.jsx)("span",{className:"text-gray-500",children:(0,M.jsx)(o.q0c,{color:"#757575",className:"xxxsm:text-[24px] xsm:text-[27px] lg:text-[28px] 2xl:text-[30px] 3xl:text-[33px] 4xl:text-[36px] 5xl:text-[38px] 6xl:text-[43px]"})})})]})]}),(0,M.jsxs)("div",{className:"flex xxxsm:flex-col xxxsm:items-start xxxsm:gap-2 md:flex-row  md:items-center md:justify-between md:gap-0",children:[(0,M.jsxs)("label",{className:"font-semibold xxxsm:text-sm xxsm:text-[16px] sm:text-[17px] 2xl:text-[19px] 3xl:text-[22px] 4xl:text-[24px] 5xl:text-[27px] 6xl:text-[31px]   text-[#3B3B3B] dark:text-main-heading-white",htmlFor:"Color",children:[me("exterior color"),(0,M.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,M.jsxs)("div",{className:"relative xxxsm:w-full md:w-[70%]",children:[(0,M.jsxs)("select",{className:"appearance-none xxxsm:w-full  text-[#999999] text-sm border border-[#D8D8D8] py-2 px-3 2xl:py-3 4xl:py-[14px] 5xl:py-4 5xl:px-4 6xl:px-[18px] 6xl:py-[18px]  2xl:text-base 3xl:text-lg 4xl:text-xl 5xl:text-[23px] 6xl:text-[27px]   rounded-md hover:border-sky-400 dark:border-border-color dark:bg-input-bg dark:text-main-heading-white dark:placeholder-main-heading-white",type:"text",id:"Color",name:"Exterior Color",onChange:e=>pe({...ce,colorId:Number(e.target.value)}),children:[(0,M.jsx)("option",{disabled:!0,selected:!ce.colorId,children:me("select color")}),(0,M.jsxs)("option",{value:8,children:[me("black")," "]}),(0,M.jsxs)("option",{value:44,children:[me("white")," "]}),(0,M.jsxs)("option",{value:39,children:[me("silver")," "]}),(0,M.jsx)("option",{value:5,children:me("blue")}),(0,M.jsx)("option",{value:40,children:me("sky blue")}),(0,M.jsx)("option",{value:12,children:me("bronze")}),(0,M.jsx)("option",{value:14,children:me("brown")}),(0,M.jsx)("option",{value:19,children:me("green")}),(0,M.jsx)("option",{value:20,children:me("grey")}),(0,M.jsx)("option",{value:22,children:me("indigo")}),(0,M.jsx)("option",{value:28,children:me("orange")}),(0,M.jsx)("option",{value:31,children:me("pink")}),(0,M.jsx)("option",{value:32,children:me("purple")}),(0,M.jsx)("option",{value:33,children:me("red")}),(0,M.jsx)("option",{value:45,children:me("yellow")}),(0,M.jsx)("option",{value:48,children:me("golden")})]}),(0,M.jsx)("div",{className:"pointer-events-none absolute inset-y-0 flex items-center   ".concat("ar"===ue.language?"left-2":"right-2"),children:(0,M.jsx)("span",{className:"text-gray-500",children:(0,M.jsx)(o.q0c,{color:"#757575",className:" xxxsm:text-[24px] xsm:text-[27px] lg:text-[28px] 2xl:text-[30px] 3xl:text-[33px] 4xl:text-[36px] 5xl:text-[38px] 6xl:text-[43px]"})})})]})]}),(0,M.jsxs)("div",{onClick:()=>Oe(!0),className:"xl:hidden xxxsm:flex xxxsm:flex-col xxxsm:items-start xx
1xsm:gap-2 md:flex-row  md:items-center md:justify-between md:gap-0",children:[(0,M.jsxs)("label",{className:"font-semibold xxxsm:text-sm xxsm:text-[16px] sm:text-[17px] 2xl:text-[19px] 3xl:text-[22px] 4xl:text-[24px] 5xl:text-[27px] 6xl:text-[31px]   text-[#3B3B3B] dark:text-main-heading-white",htmlFor:"CarInfo",children:[me("car info"),(0,M.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,M.jsx)("input",{className:"xxxsm:w-full md:w-[70%] cursor-pointer text-sm text-[#999999] border border-[#D8D8D8] py-2 px-3 2xl:py-[13px] 4xl:py-[15px] 5xl:py-[23px] 5xl:px-4 6xl:px-[18px] 6xl:py-[23px]  placeholder:2xl:text-base placeholder:3xl:text-lg  placeholder:4xl:text-xl  placeholder:5xl:text-[23px]  placeholder:6xl:text-[27px] 2xl:text-[15px] 3xl:text-[17px]  4xl:text-[19px]  5xl:text-[21px]  6xl:text-[23px]  rounded-md hover:border-sky-400 dark:border-border-color dark:bg-input-bg dark:text-main-heading-white dark:placeholder-main-heading-white",type:"text",id:"CarInfo",name:"CarInfo",placeholder:me("make/model/version"),readOnly:!0,value:ee&&"".concat(G>0?G:""," ").concat(Z?me("Make.".concat(Z||"default")):"loading"," ").concat(ee?me("Model.".concat(ee||"default")):"loading"," ").concat(xe)})]}),(0,M.jsxs)("div",{className:"flex xxxsm:flex-col xxxsm:items-start xxxsm:gap-2 md:flex-row  md:items-center md:justify-between md:gap-0",children:[(0,M.jsxs)("label",{className:"font-semibold xxxsm:text-sm xxsm:text-[16px] sm:text-[17px]  2xl:text-[19px] 3xl:text-[22px] 4xl:text-[24px] 5xl:text-[27px] 6xl:text-[31px]    text-[#3B3B3B] dark:text-main-heading-white",htmlFor:"Mileage",children:[me("mileage"),"(KM)",(0,M.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,M.jsxs)("div",{className:"flex xxxsm:w-full md:w-[70%]",children:[(0,M.jsx)("span",{className:"bg-gray-200 dark:bg-cl-dashbord-bg dark:text-main-heading-white w-[15%] h-11 2xl:h-[51px] 3xl:h-[54px] 4xl:h-[57px] 5xl:h-[63px] 6xl:h-[82px]  2xl:text-base 3xl:text-lg  4xl:text-xl  5xl:text-[23px]  6xl:text-[27px]  grid place-items-center ".concat(window.isArabic?"rounded rounded-l-none":"rounded rounded-r-none"," "),children:"KM"}),(0,M.jsx)("input",{className:"border border-[#D8D8D8] py-2 px-3 2xl:py-[13px] 4xl:py-[13px] 5xl:py-[20px] 5xl:px-4 6xl:px-[18px] 6xl:py-[21px]  placeholder:2xl:text-base placeholder:3xl:text-lg  placeholder:4xl:text-xl  placeholder:5xl:text-[23px]  placeholder:6xl:text-[27px] 2xl:text-[15px] 3xl:text-[17px]  4xl:text-[19px]  5xl:text-[21px]  6xl:text-[23px] w-[85%] dark:border-border-color dark:bg-input-bg dark:text-main-heading-white dark:placeholder-main-heading-white ".concat(window.isArabic?"rounded rounded-r-none":"rounded rounded-l-none"," hover:border-sky-400"),type:"text",id:"Mileage",name:"Mileage",placeholder:me("mileage"),value:null!==(e=ce.mileage)&&void 0!==e?e:"",onChange:e=>{const t=e.target.value;/^\d*$/.test(t)&&pe({...ce,mileage:t})},onBlur:()=>{pe((e=>({...e,mileage:e.mileage?Number(e.mileage):0})))},onKeyDown:e=>{"e"!==e.key&&"E"!==e.key&&"+"!==e.key&&"-"!==e.key||e.preventDefault()}})]})]}),(0,M.jsxs)("div",{className:"flex xxxsm:flex-col xxxsm:items-start xxxsm:gap-2 md:flex-row  md:items-center md:justify-between md:gap-0",children:[(0,M.jsxs)("label",{className:"font-semibold tracking-tighter capitalize xxxsm:text-sm xxsm:text-[16px] sm:text-[17px] 2xl:text-[19px] 3xl:text-[22px] 4xl:text-[24px] 5xl:text-[27px] 6xl:text-[31px]    text-[#3B3B3B] dark:text-main-heading-white",htmlFor:"CarInfo",children:[me("category"),(0,M.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,M.jsxs)("div",{className:"relative xxxsm:w-full md:w-[70%]",children:[(0,M.jsxs)("select",{onChange:e=>pe({...ce,vehicleCategory:e.target.value}),type:"text",id:"City",name:"City",className:"appearance-none xxxsm:w-full  text-sm text-[#999999] border border-[#D8D8D8] py-2 px-3 2xl:py-3 4xl:py-[14px] 5xl:py-4 5xl:px-4 6xl:px-[18px] 6xl:py-[18px]  2xl:text-base 3xl:text-lg 4xl:text-xl 5xl:text-[23px] 6xl:text-[27px]  rounded-md hover:border-sky-400 dark:border-border-color dark:bg-input-bg dark:text-main-heading-white dark:placeholder-main-heading-white",children:[(0,M.jsx)("option",{selected:""==ce.vehicleCategory,children:me("select category")}),(0,M.jsx)("option",{selected:"used-car"==ce.vehicleCategory,value:"used-car",children:me("used car")}),(0,M.jsx)("option",{selected:"new-car"==ce.vehicleCategory,value:"new-car",children:me("new car")})]}),(0,M.jsx)("div",{className:"pointer-events-none absolute inset-y-0 flex items-center   ".concat("ar"===ue.language?"left-2":"right-2"),children:(0,M.jsx)("span",{className:"text-gray-500",children:(0,M.jsx)(o.q0c,{color:"#757575",className:"xxxsm:text-[24px] xsm:text-[27px] lg:text-[28px] 2xl:text-[30px] 3xl:text-[33px] 4xl:text-[36px] 5xl:text-[38px] 6xl:text-[43px]"})})})]})]})]}),(0,M.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,M.jsxs)("div",{onClick:()=>Oe(!0),className:"xxxsm:hidden xl:flex xxxsm:flex-col xxxsm:items-start xx
1xsm:gap-2 md:flex-row  md:items-center md:justify-between md:gap-0",children:[(0,M.jsxs)("label",{className:"font-semibold xxxsm:text-sm xxsm:text-[16px] sm:text-[17px] 2xl:text-[19px] 3xl:text-[22px] 4xl:text-[24px] 5xl:text-[27px] 6xl:text-[31px]   text-[#3B3B3B] dark:text-main-heading-white",htmlFor:"CarInfo",children:[me("car info"),(0,M.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,M.jsx)("input",{className:"xxxsm:w-full md:w-[70%] cursor-pointer text-sm text-[#999999] border border-[#D8D8D8] py-2 px-3 2xl:py-[13px] 4xl:py-[15px] 5xl:py-[23px] 5xl:px-4 6xl:px-[18px] 6xl:py-[23px]  placeholder:2xl:text-base placeholder:3xl:text-lg  placeholder:4xl:text-xl  placeholder:5xl:text-[23px]  placeholder:6xl:text-[27px] 2xl:text-[15px] 3xl:text-[17px]  4xl:text-[19px]  5xl:text-[21px]  6xl:text-[23px]  rounded-md hover:border-sky-400 dark:border-border-color dark:bg-input-bg dark:text-main-heading-white dark:placeholder-main-heading-white",type:"text",id:"CarInfo",name:"CarInfo",placeholder:me("make/model/version"),readOnly:!0,value:ee&&"".concat(G>0?G:""," ").concat(Z?me("Make.".concat(Z||"default")):"loading"," ").concat(ee?me("Model.".concat(ee||"default")):"loading"," ").concat(xe)})]}),(0,M.jsxs)("div",{className:"flex xxxsm:flex-col xxxsm:items-start xxxsm:gap-2 md:flex-row  md:items-center md:justify-between md:gap-0",children:[(0,M.jsxs)("label",{className:"font-semibold xxxsm:text-sm xxsm:text-[16px] sm:text-[17px] 2xl:text-[19px] 3xl:text-[22px] 4xl:text-[24px] 5xl:text-[27px] 6xl:text-[31px] tracking-tighter    text-[#3B3B3B] dark:text-main-heading-white",htmlFor:"price",children:[me("price"),"(BHD)",(0,M.jsx)("span",{className:"text-red-500"})]}),(0,M.jsxs)("div",{className:"flex xxxsm:w-full md:w-[70%]",children:[(0,M.jsx)("span",{className:"bg-gray-200 dark:bg-cl-dashbord-bg dark:text-main-heading-white w-[15%] h-11 2xl:h-[51px] 3xl:h-[54px] 4xl:h-[57px] 5xl:h-[63px] 6xl:h-[82px]  2xl:text-base 3xl:text-lg  4xl:text-xl  5xl:text-[23px]  6xl:text-[27px]  grid place-items-center ".concat(window.isArabic?"rounded rounded-l-none":"rounded rounded-r-none"),children:"BHD"}),(0,M.jsx)("input",{className:"border border-[#D8D8D8] py-2 px-3 2xl:py-[13px] 4xl:py-[13px] 5xl:py-[20px] 5xl:px-4 6xl:px-[18px] 6xl:py-[21px]  placeholder:2xl:text-base placeholder:3xl:text-lg  placeholder:4xl:text-xl  placeholder:5xl:text-[23px]  placeholder:6xl:text-[27px] 2xl:text-[15px] 3xl:text-[17px]  4xl:text-[19px]  5xl:text-[21px]  6xl:text-[23px] w-[85%] dark:border-border-color dark:bg-input-bg dark:text-main-heading-white dark:placeholder-main-heading-white ".concat(window.isArabic?"rounded rounded-r-none":"rounded rounded-l-none"," hover:border-sky-400"),type:"text",id:"price",name:"price",value:null!==(t=ce.priceVehicle)&&void 0!==t?t:"",placeholder:me("price"),onChange:e=>{const t=e.target.value;/^\d*$/.test(t)&&pe({...ce,priceVehicle:t})},onBlur:()=>{pe((e=>({...e,priceVehicle:e.priceVehicle?Number(e.priceVehicle):""})))},onKeyDown:e=>{"e"!==e.key&&"E"!==e.key&&"+"!==e.key&&"-"!==e.key||e.preventDefault()}})]})]}),(0,M.jsxs)("div",{className:"flex xxxsm:flex-col xxxsm:items-start xxxsm:gap-2 md:flex-row md:items-center md:justify-between md:gap-0",children:[(0,M.jsx)("label",{className:"font-semibold tracking-tighter capitalize xxxsm:text-sm xxsm:text-[16px] sm:text-[17px] 2xl:text-[19px] 3xl:text-[22px] 4xl:text-[24px] 5xl:text-[27px] 6xl:text-[31px] text-[#3B3B3B] dark:text-main-heading-white",htmlFor:"Numberofowners",children:me("no of owners")}),(0,M.jsx)("input",{className:"xxxsm:w-full md:w-[70%] cursor-pointer border border-[#D8D8D8] py-2 px-3 2xl:py-[13px] 4xl:py-[13px] 5xl:py-[20px] 5xl:px-4 6xl:px-[18px] 6xl:py-[21px]  placeholder:2xl:text-base placeholder:3xl:text-lg  placeholder:4xl:text-xl  placeholder:5xl:text-[23px]  placeholder:6xl:text-[27px] 2xl:text-[15px] 3xl:text-[17px]  4xl:text-[19px]  5xl:text-[21px]  6xl:text-[23px] rounded-md hover:border-sky-400 dark:border-border-color dark:bg-input-bg dark:text-main-heading-white dark:placeholder-main-heading-white",type:"text",id:"Numberofowners",name:"Numberofowners",value:null!==(x=ce.noOfOwners)&&void 0!==x?x:"",placeholder:me("no of owners"),onChange:e=>{const t=e.target.value;/^\d*$/.test(t)&&pe({...ce,noOfOwners:t})},onBlur:()=>{pe((e=>({...e,noOfOwners:e.noOfOwners?Number(e.noOfOwners):""})))},onKeyDown:e=>{"e"!==e.key&&"E"!==e.key&&"+"!==e.key&&"-"!==e.key||e.preventDefault()}})]}),(0,M.jsxs)("div",{className:"flex xxxsm:flex-col xxxsm:items-start xx
1xsm:gap-2 md:flex-row  md:items-center md:justify-between md:gap-0",children:[(0,M.jsx)("label",{className:"font-semibold tracking-tighter capitalize xxxsm:text-sm xxsm:text-[16px] sm:text-[17px] 2xl:text-[19px] 3xl:text-[22px] 4xl:text-[24px] 5xl:text-[27px] 6xl:text-[31px]    text-[#3B3B3B] dark:text-main-heading-white",htmlFor:"Numberofaccidents",children:me("no of accidents")}),(0,M.jsx)("input",{className:"xxxsm:w-full md:w-[70%] cursor-pointer border border-[#D8D8D8] py-2 px-3 2xl:py-[13px] 4xl:py-[13px] 5xl:py-[20px] 5xl:px-4 6xl:px-[18px] 6xl:py-[21px]  placeholder:2xl:text-base placeholder:3xl:text-lg  placeholder:4xl:text-xl  placeholder:5xl:text-[23px]  placeholder:6xl:text-[27px] 2xl:text-[15px] 3xl:text-[17px]  4xl:text-[19px]  5xl:text-[21px]  6xl:text-[23px] rounded-md hover:border-sky-400 dark:border-border-color dark:bg-input-bg dark:text-main-heading-white dark:placeholder-main-heading-white",type:"text",id:"Numberofaccidents",name:"Numberofaccidents",value:null!==(a=ce.noOfAccident)&&void 0!==a?a:"",placeholder:me("no of accidents"),onChange:e=>{const t=e.target.value;/^\d*$/.test(t)&&pe({...ce,noOfAccident:t})},onBlur:()=>{pe((e=>({...e,noOfAccident:e.noOfAccident?Number(e.noOfAccident):""})))},onKeyDown:e=>{"e"!==e.key&&"E"!==e.key&&"+"!==e.key&&"-"!==e.key||e.preventDefault()}})]})]})]}),(0,M.jsxs)("div",{className:"xxxsm:w-[95%] md:w-[90%] lg:w-[90%] mx-auto  order-4 flex xxxsm:flex-col xxxsm:items-start xxxsm:gap-2 xl:flex-row  xl:justify-between xl:items-center xl:gap-0",children:[(0,M.jsxs)("label",{className:"flex items-center font-semibold xxxsm:text-sm xxsm:text-[16px] sm:text-[17px] 2xl:text-[19px] 3xl:text-[22px] 4xl:text-[24px] 5xl:text-[27px] 6xl:text-[31px]   text-[#3B3B3B] dark:text-main-heading-white",htmlFor:"Ad",children:[me("add description"),(0,M.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,M.jsx)("textarea",{placeholder:me("describe your car"),className:"xxxsm:w-full xl:w-[83%]  border border-[#D8D8D8] pt-7 px-3 2xl:pt-9 2xl:py-4 4xl:py-5 4xl:pt-11 5xl:py-6 5xl:pt-14 6xl:py-9 6xl:pt-16  placeholder:2xl:text-base placeholder:3xl:text-lg  placeholder:4xl:text-xl  placeholder:5xl:text-[23px]  placeholder:6xl:text-[27px] 2xl:text-[15px] 3xl:text-[17px]  4xl:text-[19px]  5xl:text-[21px]  6xl:text-[23px] rounded-md hover:border-sky-400 dark:border-border-color dark:bg-input-bg dark:text-main-heading-white dark:placeholder-main-heading-white",type:"text",id:"Ad",name:"Ad",value:null===ce||void 0===ce?void 0:ce.description,onChange:e=>pe({...ce,description:e.target.value})})]}),(0,M.jsxs)("div",{className:"border-2 order-1 md:order-4  flex flex-col items-center justify-center gap-3 border-dotted border-blue-200 xxxsm:w-[95%] md:w-[90%] mx-auto ",children:[(0,M.jsxs)("div",{className:"flex flex-col gap-1 justify-center items-center ",children:[(0,M.jsxs)("div",{className:"flex justify-center  gap-4 mt-6 2xl:mt-7 3xl:mt-8 3xl:mb-2 5xl:mt-10 5xl:mb-3",children:[(0,M.jsx)("img",{src:"/placeholderpic.jpeg",alt:"pic icon",loading:"lazy",className:"xxxsm:size-8 xxsm:size-9 sm:size-10  md:size-11  2xl:size-12 3xl:size-14 4xl:size-16 5xl:size-20"}),(0,M.jsxs)("label",{htmlFor:"image",className:" bg-blue-500 cursor-pointer text-white xxxsm:text-[13px] xxsm:text-sm sm:text-[15px] md:text-[16px] xxxsm:px-2  md:px-3 py-1  2xl:px-4 3xl:px-6 5xl:px-7 6xl:px-8  3xl:text-[17px] 4xl:text-lg 5xl:text-[22px] 6xl:text-2xl 3xl:rounded-md flex justify-center items-center rounded-sm  ",children:["+",me("add photo")]}),(0,M.jsx)("input",{type:"file",accept:"image/*",multiple:!0,onChange:e=>{const t=Array.from(e.target.files),x=8-Ie.length;if(x<=0)return void r.oR.warn("You can only upload up to 8 images.");const l=t.filter((e=>!(e.size>5242880)||(r.oR.error("".concat(e.name," is larger than 5MB and was discarded.")),!1))),a=l.slice(0,x);a.length<l.length&&r.oR.warn("You can only select up to ".concat(x," more images. The rest were discarded.")),Le((e=>[...e,...a]))},className:"hidden",id:"image"})]}),(0,M.jsx)("p",{className:"text-xs text-center mb-2 text-gray-400 2xl:text-sm 4xl:text-[15px] 5xl:text-lg 6xl:text-xl  ".concat(window.isArabic?"mr-12":"ml-12"),children:me("(max limit 8 images to upload)")})]}),(0,M.jsx)("div",{className:"flex w-[99%] flex-wrap md:flex-nowrap gap-2 items-center justify-center mx-auto mb-1 md:mb-8 5xl:mb-12",children:(0,M.jsx)(ve.JY,{onDragEnd:e=>{if(!e.destination)return;const t=Array.from(Ie),[x]=t.splice(e.source.index,1);t.splice(e.destination.index,0,x),Le(t)},children:(0,M.jsx)(ve.gL,{droppableId:"images",direction:"horizontal",children:e=>(0,M.jsxs)("div",{className:"flex flex-wrap gap-2 mt-4",...e.droppableProps,ref:e.innerRef,children:[Te(),e.placeholder]})})})}),(0,M.jsx)("div",{className:" justify-center mb-10 5xl:mb-14 6xl:mb-20  xxxsm:hidden md:flex",children:(0,M.jsxs)("div",{className:"grid grid-cols-2 md:gap-y-10 md:gap-x-12 3xl:gap-y-12 3xl:gap-x-14 4xl:gap-y-16  md:w-[90%] xl:w-[80%] ",children:[(0,M.jsxs)("div",{className:"flex  gap-3",children:[(0,M.jsx)("div",{children:(0,M.jsx)(ge.t$n,{className:"text-[#0473E9] font-bold md:text-lg xl:text-xl 3xl:text-[23px] 4xl:text-[26px] 5xl:text-[30px] 6xl:text-[35px] flex-shrink-0 "})}),(0,M.jsxs)("div",{className:" md:text-[13px] xl:text-sm 2xl:text-base 3xl:text-lg 4xl:text-xl 5xl:text-[23px] 6xl:text-[27px]  text-[#7b8397]",children:[" ",(0,M.jsxs)("span",{className:"text-[#434343] dark:text-main-heading-white font-bold",children:[me("drag & drop picture")," "]})," ",me("at first index to make profile")," "]})]}),(0,M.jsxs)("div",{className:"flex  gap-3",children:[(0,M.jsx)("div",{children:(0,M.jsx)(ge.t$n,{className:"text-[#0473E9] font-bold md:text-lg  xl:text-xl 3xl:text-[23px] 4xl:text-[26px] 5xl:text-[30px] 6xl:text-[35px] flex-shrink-0 "})}),(0,M.jsxs)("div",{className:" md:text-[13px] xl:text-sm 2xl:text-base 3xl:text-lg 4xl:text-xl 5xl:text-[23px] 6xl:text-[27px] text-[#7b8397]",children:[" ",(0,M.jsx)("span",{className:"text-[#434343] dark:text-main-heading-white font-bold",children:me("photos should be")})," ",me("in 'jpeg, jpg, png, gif' format only")]})]}),(0,M.jsxs)("div",{className:"flex gap-3",children:[(0,M.jsx)("div",{children:(0,M.jsx)(ge.t$n,{className:"text-[#0473E9] font-bold md:text-lg xl:text-xl 3xl:text-[23px] 4xl:text-[26px] 5xl:text-[30px] 6xl:text-[35px] flex-shrink-0 "})}),(0,M.jsxs)("div",{className:" md:text-[13px] xl:text-sm 2xl:text-base 3xl:text-lg 4xl:text-xl 5xl:text-[23px] 6xl:text-[27px] text-[#7b8397]",children:[" ",(0,M.jsxs)("span",{className:"text-[#434343] dark:text-main-heading-white font-bold",children:[me("adding 8 pictures")," "]}),me("improves the chance for a quick sale")]})]}),(0,M.jsxs)("div",{className:"flex  gap-3",children:[(0,M.jsx)("div",{children:(0,M.jsx)(ge.t$n,{className:"text-[#0473E9] font-bold md:text-lg  xl:text-xl 3xl:text-[23px] 4xl:text-[26px] 5xl:text-[30px] 6xl:text-[35px] flex-shrink-0 "})}),(0,M.jsxs)("div",{className:" md:text-[13px] xl:text-sm 2xl:text-base 3xl:text-lg 4xl:text-xl text-[#7b8397] 5xl:text-[23px] 6xl:text-[27px]",children:[" ",(0,M.jsx)("span",{className:"text-[#434343] font-bold dark:text-main-heading-white ",children:me("adding clear front, back and interior pictures")})," ",me("of your car increases the quality\xa0of\xa0your\xa0ad")," "]})]})]})})]})]})}),re&&(0,M.jsx)("div",{className:"bg-white dark:bg-dark-from mt-4 py-8 border-t-4 border-[#ececec] hover:border-t-4 dark:border-input-bg  hover:border-[#134D99]  4xl:border-t-[6px] hover:4xl:border-t-[6px] hover:shadow-lg",children:(0,M.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,M.jsxs)("div",{className:"flex justify-between w-[95%] mx-auto",children:[(0,M.jsx)("div",{className:"md:text-[#333333] xxxsm:text-[#A4A4A4] dark:text-main-heading-white xxxsm:text-[16
1px] xxsm:text-[18px] md:text-xl  2xl:text-2xl 3xl:text-[27px] 4xl:text-3xl 5xl:text-[34px] 6xl:text-[37px]  font-bold  capitalize",children:me("additional information")}),(0,M.jsx)("div",{className:"text-[#868686] font-bold text-[22px] uppercase"})]}),(0,M.jsxs)("div",{className:"xxxsm:w-[95%] md:w-[90%] mx-auto flex flex-col gap-5 2xl:gap-6 4xl:gap-7 5xl:gap-8 6xl:gap-10",children:[(0,M.jsxs)("div",{className:"flex xxxsm:flex-col xxxsm:gap-2 md:flex-row md:gap-0 xl:gap-3",children:[(0,M.jsx)("label",{className:"capitalize xxxsm:w-full md:w-[30%]  xl:w-[20%] flex md:justify-start xl:justify-end md:items-center font-semibold xxxsm:text-sm xxsm:text-[16px] sm:text-[17px] 2xl:text-[19px] 3xl:text-[22px] 4xl:text-[24px] 5xl:text-[27px] 6xl:text-[31px]   text-[#3B3B3B] dark:text-main-heading-white",children:me("body style")}),(0,M.jsxs)("div",{className:"relative xxxsm:w-full md:w-[70%] xl:w-[39.5%]",children:[(0,M.jsxs)("select",{onChange:e=>{pe((t=>({...t,vehicleType:{id:Number(e.target.value)},vehicleTypeName:e.target.options[e.target.selectedIndex].text})))},className:"xxxsm:w-full appearance-none border border-[#B9B9B9] py-2 px-3 2xl:py-3 4xl:py-[14px] 5xl:py-4 5xl:px-4 6xl:px-[18px] 6xl:py-[18px]  2xl:text-base 3xl:text-lg 4xl:text-xl 5xl:text-[23px] 6xl:text-[27px] rounded-md hover:border-sky-400 outline-none text-[#999999] text-sm dark:border-border-color dark:bg-input-bg",children:[(0,M.jsx)("option",{value:"",children:me("what is the body style of your car")}),(0,M.jsx)("option",{selected:1===(null===ce||void 0===ce||null===(C=ce.vehicleType)||void 0===C?void 0:C.id),id:"1",value:"1",children:me("Sedan")}),(0,M.jsx)("option",{selected:2===(null===ce||void 0===ce||null===(D=ce.vehicleType)||void 0===D?void 0:D.id),id:"2",value:"2",children:me("hatchback")}),(0,M.jsx)("option",{selected:3===(null===ce||void 0===ce||null===(A=ce.vehicleType)||void 0===A?void 0:A.id),id:"3",value:"3",children:me("suv")}),(0,M.jsx)("option",{selected:4===(null===ce||void 0===ce||null===(S=ce.vehicleType)||void 0===S?void 0:S.id),id:"4",value:"4",children:me("truck")}),(0,M.jsx)("option",{selected:5===(null===ce||void 0===ce||null===(B=ce.vehicleType)||void 0===B?void 0:B.id),id:"5",value:"5",children:me("bus")}),(0,M.jsx)("option",{selected:6===(null===ce||void 0===ce||null===(z=ce.vehicleType)||void 0===z?void 0:z.id),id:"6",value:"6",children:me("sports car")}),(0,M.jsx)("option",{selected:7===(null===ce||void 0===ce||null===(F=ce.vehicleType)||void 0===F?void 0:F.id),id:"7",value:"7",children:me("crossover")}),(0,M.jsx)("option",{selected:8===(null===ce||void 0===ce||null===(E=ce.vehicleType)||void 0===E?void 0:E.id),id:"8",value:"8",children:me("coupe")}),(0,M.jsx)("option",{selected:9===(null===ce||void 0===ce||null===(I=ce.vehicleType)||void 0===I?void 0:I.id),id:"9",value:"9",children:me("minivan")}),(0,M.jsx)("option",{selected:10===(null===ce||void 0===ce||null===(L=ce.vehicleType)||void 0===L?void 0:L.id),id:"10",value:"10",children:me("pickup truck")}),(0,M.jsx)("option",{selected:11===(null===ce||void 0===ce||null===(T=ce.vehicleType)||void 0===T?void 0:T.id),id:"11",value:"11",children:me("wagon")}),(0,M.jsx)("option",{selected:12===(null===ce||void 0===ce||null===(P=ce.vehicleType)||void 0===P?void 0:P.id),id:"12",value:"12",children:me("van")}),(0,M.jsx)("option",{selected:13===(null===ce||void 0===ce||null===(R=ce.vehicleType)||void 0===R?void 0:R.id),id:"13",value:"13",children:me("luxury car")}),(0,M.jsx)("option",{selected:14===(null===ce||void 0===ce||null===(q=ce.vehicleType)||void 0===q?void 0:q.id),id:"14",value:"14",children:me("atv")}),(0,M.jsx)("option",{selected:15===(null===ce||void 0===ce||null===(V=ce.vehicleType)||void 0===V?void 0:V.id),id:"15",value:"15",children:me("rv")})]}),(0,M.jsx)("div",{className:"pointer-events-none absolute inset-y-0 flex items-center   ".concat("ar"===ue.language?"left-2":"right-2"),children:(0,M.jsx)("span",{className:"text-gray-500",children:(0,M.jsx)(o.q0c,{color:"#757575",className:"xxxsm:text-[24px] xsm:text-[27px] lg:text-[28px] 2xl:text-[30px] 3xl:text-[33px] 4xl:text-[36px] 5xl:text-[38px] 6xl:text-[43px]"})})})]})]}),(0,M.jsxs)("div",{className:"flex xxxsm:flex-col xxxsm:gap-2 md:flex-row md:gap-0 xl:gap-3",children:[(0,M.jsx)("label",{className:"capitalize  xxxsm:w-full  md:w-[30%]  xl:w-[20%] flex md:justify-start xl:justify-end md:items-center font-semibold xxxsm:text-sm xxsm:text-[16
1px] sm:text-[17px] 2xl:text-[19px] 3xl:text-[22px] 4xl:text-[24px] 5xl:text-[27px] 6xl:text-[31px] text-[#3B3B3B] dark:text-main-heading-white",children:me("number of doors")}),(0,M.jsx)("div",{className:"flex space-x-2  md:w-[70%] xl:w-[80%] ",children:[{id:1,result:2},{id:2,result:3},{id:3,result:4},{id:4,result:5}].map((e=>{var t,x;return(0,M.jsx)("div",{id:e.id,className:"px-[14px] py-[6px] text-[#5e5e5e] rounded-[4px] border border-[#D8D8D8] dark:border-border-color  font-normal cursor-pointer text-[14px] 2xl:text-base 3xl:text-lg 4xl:text-xl 5xl:text-[23px] 6xl:text-[27px] 4xl:rounded-[5px] 5xl:rounded-[6px] 2xl:px-[18px] 4xl:px-[22px] 4xl:py-[8px] 5xl:px-[25px] 5xl:py-[10px] 6xl:px-[28px] 6xl:py-[15px] ".concat((null===ce||void 0===ce||null===(t=ce.dimension)||void 0===t||null===(x=t.numberofdoor)||void 0===x?void 0:x.id)===e.id&&"bg-[#134D99] text-white"," "),onClick:()=>(e=>{pe((t=>({...t,dimension:{...t.dimension,numberofdoor:{id:Number(e)}}})))})(e.id),children:(0,M.jsx)("span",{children:e.result})},e.id)}))})]}),(0,M.jsxs)("div",{className:"flex xxxsm:flex-col xxxsm:gap-2 md:flex-row md:gap-0 xl:gap-3",children:[(0,M.jsx)("label",{className:"capitalize  xxxsm:w-full  md:w-[30%]  xl:w-[20%] flex md:justify-start xl:justify-end xl:items-center font-semibold xxxsm:text-sm xxsm:text-[16px] sm:text-[17px]  2xl:text-[19px] 3xl:text-[22px] 4xl:text-[24px] 5xl:text-[27px] 6xl:text-[31px] text-[#3B3B3B] dark:text-main-heading-white",children:me("seating capacity")}),(0,M.jsx)("div",{class:"flex space-x-2 xxxsm:w-full md:w-[70%] xl:w-[80%]",children:(0,M.jsx)("div",{className:"xxxsm:w-full xl:w-[60%] flex flex-wrap gap-2",children:[{id:1,result:"2 Seater"},{id:2,result:"4 Seater"},{id:3,result:"5 Seater"},{id:4,result:"6 Seater"},{id:5,result:"7 Seater"},{id:6,result:"8 Seater"},{id:7,result:"8+ Seater"}].map((e=>{var t,x;return(0,M.jsx)("div",{id:e.id,className:"px-3 py-[6px] text-[#5e5e5e] rounded-[4px] border border-[#D8D8D8] dar
1k:border-border-color font-normal cursor-pointer text-[14px] 2xl:text-base 3xl:text-lg 4xl:text-xl 5xl:text-[23px] 6xl:text-[27px] 4xl:rounded-[5px] 5xl:rounded-[6px] 2xl:px-[18px] 4xl:px-[22px] 4xl:py-[8px] 5xl:px-[25px] 5xl:py-[10px] 6xl:px-[28px] 6xl:py-[15px]  ".concat((null===ce||void 0===ce||null===(t=ce.dimension)||void 0===t||null===(x=t.numberofseating)||void 0===x?void 0:x.id)===e.id&&"bg-[#134D99] text-white"," "),onClick:()=>(e=>{pe((t=>({...t,dimension:{...t.dimension,numberofseating:{id:Number(e)}}})))})(e.id),children:(0,M.jsx)("span",{children:me("Seats.".concat(e.result))})},e.id)}))})})]}),(0,M.jsxs)("div",{className:"flex xxxsm:flex-col xxxsm:gap-2 md:flex-row md:gap-0 xl:gap-3",children:[(0,M.jsx)("label",{className:"capitalize  xxxsm:w-full   md:w-[30%]  xl:w-[20%] flex md:justify-start xl:justify-end md:items-center font-semibold xxxsm:text-sm xxsm:text-[16px] sm:text-[17px] 2xl:text-[19px] 3xl:text-[22px] 4xl:text-[24px] 5xl:text-[27px] 6xl:text-[31px] text-[#3B3B3B] dark:text-main-heading-white",children:me("fuel type")}),(0,M.jsx)("div",{class:"flex space-x-2 xxxsm:w-full md:w-[70%] xl:w-[80%] ",children:(0,M.jsx)("div",{className:"xxxsm:w-full xl:w-[60%] flex flex-wrap gap-2",children:[{id:1,result:"Petrol"},{id:2,result:"Diesel"},{id:3,result:"Electric"},{id:4,result:"CNG"},{id:5,result:"LPG"},{id:6,result:"Hybrid"}].map((e=>{var t;return(0,M.jsx)("div",{id:e.id,className:"px-3 py-[6px] text-[#5e5e5e] rounded-[4px] border border-[#D8D8D8] dar
1k:border-border-color font-normal cursor-pointer text-[14px]  2xl:text-base 3xl:text-lg 4xl:text-xl 5xl:text-[23px] 6xl:text-[27px] 4xl:rounded-[5px] 5xl:rounded-[6px] 2xl:px-[18px] 4xl:px-[22px] 4xl:py-[8px] 5xl:px-[25px] 5xl:py-[10px] 6xl:px-[28px] 6xl:py-[15px]  ".concat((null===ce||void 0===ce||null===(t=ce.fuelType)||void 0===t?void 0:t.id)===e.id&&"bg-[#134D99] text-white","  "),onClick:()=>(e=>{pe((t=>({...t,fuelTypeName:e.result,fuelType:{id:Number(e.id)}})))})(e),children:(0,M.jsx)("span",{children:me("Fuel.".concat(e.result))})},e.id)}))})})]}),(0,M.jsxs)("div",{className:"flex xxxsm:flex-col xxxsm:gap-2 md:flex-row md:gap-0 xl:gap-3",children:[(0,M.jsxs)("label",{className:"capitalize  xxxsm:w-full   md:w-[30%]  xl:w-[20%] flex md:justify-start xl:justify-end md:items-center font-semibold xxxsm:text-sm xxsm:text-[16px] sm:text-[17px] 2xl:text-[19px] 3xl:text-[22px] 4xl:text-[24px] 5xl:text-[27px] 6xl:text-[31px] text-[#3B3B3B] dark:text-main-heading-white",children:[" ",me("engine cc")]}),(0,M.jsx)("div",{className:"xxxsm:w-full  md:w-[70%] xl:w-[80%]",children:(0,M.jsx)("input",{className:"xxxsm:w-full xl:w-[50%] border border-[#B9B9B9] py-2 px-3   2xl:py-3 4xl:py-[14px] 5xl:py-5 5xl:px-4 6xl:px-[18px] 6xl:py-[22px]  placeholder:2xl:text-base placeholder:3xl:text-lg  placeholder:4xl:text-xl  placeholder:5xl:text-[23px]  placeholder:6xl:text-[27px] text-base 2xl:text-base 3xl:text-lg 4xl:text-xl 5xl:text-[26px] 6xl:text-3xl  rounded-md hover:border-sky-400 outline-none text-[#999999] dark:border-border-color dark:bg-input-bg",type:"text",onChange:e=>pe((t=>({...t,engine:{displacement:Number(e.target.value)}}))),onInput:e=>{e.target.value=e.target.value.replace(/[^0-9]/g,"")},value:null!==(_=null===ce||void 0===ce||null===(O=ce.engine)||void 0===O?void 0:O.displacement)&&void 0!==_?_:"",placeholder:"What is the Engine CC of your car?"})})]}),(0,M.jsxs)("div",{className:"flex xxxsm:flex-col xxxsm:gap-2 md:flex-row md:gap-0 xl:gap-3",children:[(0,M.jsx)("label",{className:"capitalize  xxxsm:w-full  md:w-[30%]  xl:w-[20%] flex md:justify-start xl:justify-end pt-2 font-semibold xxxsm:text-sm xxsm:text-[16px] sm:text-[17px] 2xl:text-[19px] 3xl:text-[22px] 4xl:text-[24px] 5xl:text-[27px] 6xl:text-[31px] text-[#3B3B3B] dark:text-main-heading-white",children:me("number of cylinders")}),(0,M.jsx)("div",{class:" flex flex-wrap gap-2 xxxsm:w-full md:w-[70%] xl:w-[80%]",children:(0,M.jsx)("div",{className:"xxxsm:w-full xl:w-[60%] flex flex-wrap gap-2",children:[{id:1,result:"3"},{id:2,result:"4"},{id:3,result:"5"},{id:4,result:"6"},{id:5,result:"8"},{id:6,result:"10"},{id:7,result:"12"},{id:8,result:"16"}].map((e=>{var t,x;return(0,M.jsx)("div",{id:e.id,className:"px-3 py-[6px] text-[#5e5e5e] rounded-[4px] border border-[#D8D8D8] dar
1k:border-border-color font-normal cursor-pointer text-[14px] 2xl:text-base 3xl:text-lg 4xl:text-xl 5xl:text-[23px] 6xl:text-[27px] 4xl:rounded-[5px] 5xl:rounded-[6px] 2xl:px-[18px] 4xl:px-[22px] 4xl:py-[8px] 5xl:px-[25px] 5xl:py-[10px] 6xl:px-[28px] 6xl:py-[15px] ".concat((null===ce||void 0===ce||null===(t=ce.engine)||void 0===t||null===(x=t.numberofcylinder)||void 0===x?void 0:x.id)===e.id&&"bg-[#134D99] text-white"," "),onClick:()=>(e=>{pe((t=>({...t,engine:{...t.engine,numberofcylinder:{id:Number(e)}}})))})(e.id),children:(0,M.jsx)("span",{children:e.result})},e.id)}))})})]}),(0,M.jsxs)("div",{className:"flex xxxsm:flex-col xxxsm:gap-2 md:flex-row md:gap-0 xl:gap-3",children:[(0,M.jsx)("label",{className:"capitalize  xxxsm:w-full  md:w-[30%]  xl:w-[20%] flex md:justify-start xl:justify-end md:items-center font-semibold xxxsm:text-sm xxsm:text-[16px] sm:text-[17px]  2xl:text-[19px] 3xl:text-[22px] 4xl:text-[24px] 5xl:text-[27px] 6xl:text-[31px] text-[#3B3B3B] dark:text-main-heading-white",children:me("transmission")}),(0,M.jsx)("div",{class:"flex flex-wrap gap-2 xxxsm:w-full md:w-[70%] xl:w-[80%]",children:(0,M.jsx)("div",{className:"xxxsm:w-full xl:w-[70%] flex flex-wrap gap-2",children:[{id:1,result:"Manual"},{id:2,result:"Automatic"}].map((e=>{var t;return(0,M.jsx)("div",{id:e.id,className:"px-3 py-[6px] text-[#5e5e5e] rounded-[4px] border border-[#D8D8D8] dar
1k:border-border-color font-normal cursor-pointer text-[14px]   2xl:text-base 3xl:text-lg 4xl:text-xl 5xl:text-[23px] 6xl:text-[27px] 4xl:rounded-[5px] 5xl:rounded-[6px] 2xl:px-[18px] 4xl:px-[22px] 4xl:py-[8px] 5xl:px-[25px] 5xl:py-[10px] 6xl:px-[28px] 6xl:py-[15px]   ".concat((null===ce||void 0===ce||null===(t=ce.transmission)||void 0===t?void 0:t.id)===e.id&&"bg-[#134D99] text-white"," "),onClick:()=>(e=>{pe((t=>({...t,transmission:{id:Number(e.id)},transmissionName:e.result})))})(e),children:(0,M.jsx)("span",{children:me("Transmission.".concat(e.result))})},e.id)}))})})]}),(0,M.jsxs)("div",{className:"flex xxxsm:flex-col xxxsm:gap-2 md:flex-row md:gap-0 xl:gap-3",children:[(0,M.jsx)("label",{className:"capitalize xxxsm:w-full   md:w-[30%]  xl:w-[20%] flex md:justify-start xl:justify-end pt-2 font-semibold xxxsm:text-sm xxsm:text-[16px] sm:text-[17px]  2xl:text-[19px] 3xl:text-[22px] 4xl:text-[24px] 5xl:text-[27px] 6xl:text-[31px] text-[#3B3B3B] dark:text-main-heading-white",children:me("drive type")}),(0,M.jsx)("div",{class:"flex xxxsm:w-full md:w-[70%] xl:w-[80%]",children:(0,M.jsx)("div",{className:"xxxsm:w-full xl:w-[50%] flex flex-wrap gap-2",children:[{id:1,result:"Front Wheel Drive"},{id:2,result:"Rear Wheel Drive"},{id:3,result:"All Wheel Drive"},{id:4,result:"4x4"}].map((e=>{var t;return(0,M.jsx)("div",{id:e.id,className:"px-3 py-[6px] text-[#5e5e5e] rounded-[4px] border border-[#D8D8D8] dar
1k:border-border-color font-normal cursor-pointer text-[14px] 2xl:text-base 3xl:text-lg 4xl:text-xl 5xl:text-[23px] 6xl:text-[27px] 4xl:rounded-[5px] 5xl:rounded-[6px] 2xl:px-[18px] 4xl:px-[22px] 4xl:py-[8px] 5xl:px-[25px] 5xl:py-[10px] 6xl:px-[28px] 6xl:py-[15px]   ".concat((null===ce||void 0===ce||null===(t=ce.wheelDriveType)||void 0===t?void 0:t.id)===e.id&&"bg-[#134D99] text-white"," "),onClick:()=>(e=>{pe((t=>({...t,wheelDriveType:{id:Number(e)}})))})(e.id),children:(0,M.jsx)("span",{children:me("driveTypes.".concat(e.result))})},e.id)}))})})]}),(0,M.jsxs)("div",{className:"flex xxxsm:flex-col xxxsm:gap-2 md:flex-row md:gap-0 xl:gap-3",children:[(0,M.jsx)("label",{className:"capitalize  xxxsm:w-full  md:w-[30%]  xl:w-[20%] flex md:justify-start xl:justify-end font-semibold xxxsm:text-sm xxsm:text-[16px] sm:text-[17px]   2xl:text-[19px] 3xl:text-[22px] 4xl:text-[24px] 5xl:text-[27px] 6xl:text-[31px] text-[#3B3B3B]  dark:text-main-heading-white",children:me("features")}),(0,M.jsx)("div",{className:"grid grid-cols-2 xl:grid-cols-3 xxxsm:gap-y-3 xxxsm:gap-x-12 sm:gap-y-4 md:gap-4 4xl:gap-5 5xl:gap-7 6xl:gap-9 xxxsm:w-full md:w-[70%] xl:w-[80%] ",children:Ve.map(((e,t)=>{var x,l;return(0,M.jsxs)("label",{className:"flex items-center space-x-2  w-fit",children:[(0,M.jsx)("input",{type:"checkbox",value:e.features,checked:"yes"===(null===ce||void 0===ce||null===(x=ce.carVersionFeatures)||void 0===x||null===(l=x[(null===e||void 0===e?void 0:e.id)-1])||void 0===l?void 0:l.value),className:"\n    appearance-none cursor-pointer rounded-sm\n    border border-[#aaa] dark:border-light-border\n    bg-white dark:bg-cl-dashbord-bg\n    checked:bg-[#0173E9] dark:checked:bg-[#0173E9]\n    checked:border-transparent\n    relative transition-all duration-200\n\n    \n    w-[16px] h-[16px]              \n    2xl:w-4 2xl:h-4\n    4xl:w-[19px] 4xl:h-[19px]\n    5xl:w-[21px] 5xl:h-[21px]\n    6xl:w-[23px] 6xl:h-[23px]\n\n    checked:before:content-['\u2714']\n    checked:before:absolute\n    checked:before:inset-0\n    checked:before:flex\n    checked:before:items-center\n    checked:before:justify-center\n    checked:before:text-white\n    checked:before:text-[13px]\n    2xl:checked:before:text-[14px]\n    3xl:checked:before:text-[16px]\n    4xl:checked:before:text-[17px]\n    5xl:checked:before:text-[20px]\n    6xl:checked:before:text-[22px]\n  ",onChange:()=>{pe((t=>({...t,carVersionFeatures:t.carVersionFeatures.map((t=>t.feature.id===e.id?{...t,value:null===t.value?"yes":"yes"===t.value?"no":"yes"}:t))})))}}),(0,M.jsx)("span",{className:"".concat(window.isArabic&&"pr-3"," text-gray-700 dark:text-gray-400 xxxsm:text-sm sm:text-[15px] md:text-base 2xl:text-base 3xl:text-lg 4xl:text-xl 5xl:text-[23px] 6xl:text-[27px]"),children:me("Features.".concat(e.features))})]},t)}))}),(0,M.jsx)("div",{className:"relative hidden ",children:(0,M.jsx)("input",{type:"text",readOnly:!0,onClick:()=>{Pt(!Tt)},value:Rt.map((e=>e.features)).join(", "),placeholder:me("select features"),className:"w-full border p-2 cursor-pointer"})})]}),(0,M.jsx)("div",{children:Tt&&(0,M.jsx)("div",{className:"fixed inset-0 flex items-end justify-center  bg-black bg-opacity-50 z-50",style:{animation:"slide-up 0.3s ease-out"},children:(0,M.jsxs)("div",{className:"bg-white rounded-t-lg shadow-lg   w-full  h-full overflow-y-auto ",style:{animation:"slide-up 0.3s ease-out"},children:[(0,M.jsxs)("div",{className:"flex items-center justify-between p-4 border-b sticky top-0 bg-white",children:[(0,M.jsx)("h2",{className:"text-lg font-bold",children:me("select features")}),(0,M.jsx)("button",{onClick:()=>{Pt(!1)},className:"text-gray-600 hover:text-gray-800",children:(0,M.jsx)(Ce.$8F,{size:24})})]}),(0,M.jsx)("div",{className:"p-4 overflow-y-auto h-auto z-50",children:Ve.map(((e,t)=>(0,M.jsxs)("label",{className:"flex items-center space-x-2 mb-2",children:[(0,M.jsx)("input",{type:"checkbox",value:e.features,checked:Rt.some((t=>t.id===e.id)),onChange:()=>(e=>{qt((t=>t.some((t=>t.id===e.id))?t.filter((t=>t.id!==e.id)):[...t,e]))})(e),className:"form-checkbox text-blue-500"}),(0,M.jsx)("span",{className:"text-gray-700",children:me("Features.".concat(e.features))})]},t)))}),(0,M.jsx)("div",{className:"p-4 border-t sticky bottom-0 bg-white",children:(0,M.jsx)("button",{onClick:()=>{pe((e=>({...e,carVersionFeatures:Ve.map((e=>({...e,value:Rt.some((t=>
1t.id===e.id))?"yes":"no"})))}))),Pt(!1)},className:"w-full bg-blue-500 text-white py-2 rounded hover:bg-blue-600",children:me("done")})})]})})})]})]})}),(0,M.jsx)("div",{className:" mt-4",children:(0,M.jsx)("div",{className:"w-[100%] mx-auto pt-3 mb-6 ".concat((window.isArabic,"text-end")," "),children:Mt?(0,M.jsx)("button",{disabled:Ft||At,onClick:async()=>{Et(!0);try{const e={city:{id:Ct.city},mileage:Ct.mileage,numberOfAccidents:Ct.numberOfAccidents,numberOfOwners:Ct.numberOfOwners,description:Ct.description,price:Ct.price,biddingVehicle:Ct.biddingVehicle,image:Ct.images,color:{id:null===Ct||void 0===Ct?void 0:Ct.colorId}};(await s.A.put("".concat("https://www.arabiawheel.com/automotor","/api/vehicles/").concat(Mt),e,{headers:{Authorization:"Bearer ".concat(de)}})).data&&(r.oR.success("Your Car Updated Successfully"),Lt("".concat(me("routes.DealerDashboard","/dealer/dashboard"))))}catch(e){r.oR.error("Error Updating Car.")}finally{Et(!1)}},className:"disabled:bg-[#1876D6]/70 bg-[#0473E9] px-3 py-2 2xl:px-4 4xl:px-
15 4xl:py-3 5xl:px-6 5xl:py-4 6xl:py-5 2xl:py-[10px] 2xl:text-lg 4xl:text-xl 5xl:text-[22px] 6xl:text-[28px] rounded-md font-sans text-white xxxsm:w-full md:w-auto",children:Ft?(0,M.jsxs)("div",{className:"font-sans text-white",children:[me("updating"),"..."]}):me("update & continue")}):(0,M.jsx)("button",{disabled:De,onClick:async e=>{e.preventDefault();const t=localStorage.getItem("automotors__UserData");if(!t)return void r.oR.error("User ID not found in localStorage");const x=(0,d.s)(t);Ae(!0);const l=(()=>{var e,t,x;const{selectedYear:l,colorId:a,city:s,cityName:r,id:i,engine:d,wheelDriveType:n,transmission:o,vehicleType:c,fuelType:p,dimension:m}=ce;return s.length<1?"City is required":l<1?"Model Year is required":i?a.length<1?"Colorid is required":Ie.length<1?"Select at least one picture":(null===d||void 0===d||null===(e=d.displacement)||void 0===e?void 0:e.length)<1?"Engine capacity (cc) is required":null!==d&&void 0!==d&&d.numberofcylinder?null!==n&&void 0!==n&&n.id?null!==o&&void 0!==o&&o.id?null!==c&&void 0!==c&&c.id?null!==p&&void 0!==p&&p.id?null!==m&&void 0!==m&&null!==(t=m.numberofdoor)&&void 0!==t&&t.id?!(null===m||void 0===m||null===(x=m.numberofseating)||void 0===x||!x.id)||"Number of Seating Capacity required":"Number of Doors required":"Fuel type is required":"Vehicle type is required":"Transmission type is required":"Wheel drive type is required":"Number of Cylinder is required":"Car Version is required"})();if(!0!==l)return r.oR.error(l),void Ae(!1);try{var a;const e=Ie.map((e=>new Promise(((t,x)=>{new(Ne())(e,{quality:.8,maxWidth:1e3,maxHeight:1200,mimeType:"image/webp",success:e=>{t(e)},error:e=>{x(e)}})})))),t=(await Promise.all(e)).map((e=>{const t=new FormData;return t.append("file",e),t.append("upload_preset","cxbzsn0g"),t.append("cloud_name","dtlrs3y1y"),t.append("folder","dealerVehicle"),s.A.post("https://api.cloudinary.com/v1_1/dtlrs3y1y/image/upload",t)})),l=(await Promise.all(t)).map((e=>({cloudinary_src:e.data.url,cloud_id:e.data.public_id})));if(await new Promise((e=>{pe((t=>{const x={...t,images:l};return e(x),x}))})),(null===ce||void 0===ce||null===(a=ce.carVersionFeatures)||void 0===a?void 0:a.length)>0){var i,n,o,c,p,m,u,h,g,f,v,b,w,y,j,N,k,C,D,A,S,B,z,F,E,M,I,L;const e={year:Number(ce.selectedYear),makeName:Z||"",modelName:ee||"",fuelTypeName:ce.fuelTypeName?ce.fuelTypeName:ce.engine.engineType,transmissionName:ce.transmissionName?ce.transmissionName:ce.transmission.transmissionType,vehicleTypeName:ce.vehicleTypeName?ce.vehicleTypeName:ce.vehicleType.name,user:{id:null===x||void 0===x?void 0:x.id},color:{id:ce.colorId},vehicleCategory:ce.vehicleCategory,numberOfAccidents:ce.noOfAccident,numberOfOwners:ce.noOfOwners,description:ce.description,price:null===ce||void 0===ce?void 0:ce.priceVehicle,mileage:ce.mileage,city:{id:ce.city},cityName:ce.cityName,biddingVehicle:ce.biddingVehicle,vehicleFeatures:[{value:null===ce||void 0===ce||null===(i=ce.carVersionFeatures[3])||void 0===i?void 0:i.value,feature:{id:4}},{value:null===ce||void 0===ce||null===(n=ce.carVersionFeatures[0])||void 0===n?void 0:n.value,feature:{id:1}},{value:null===ce||void 0===ce||null===(o=ce.carVersionFeatures[28])||void 0===o?void 0:o.value,feature:{id:29}},{value:null===ce||void 0===ce||null===(c=ce.carVersionFeatures[10])||void 0===c?void 0:c.value,feature:{id:11}},{value:null===ce||void 0===ce||null===(p=ce.carVersionFeatures[63])||void 0===p?void 0:p.value,feature:{id:64}},{value:null===ce||void 0===ce||null===(m=ce.carVersionFeatures[21])||void 0===m?void 0:m.value,feature:{id:22}},{value:null===ce||void 0===ce||null===(u=ce.carVersionFeatures[64])||void 0===u?void 0:u.value,feature:{id:65}},{value:null===ce||void 0===ce||null===(h=ce.carVersionFeatures[59])||void 0===h?void 0:h.value,feature:{id:60}},{value:null===ce||void 0===ce||null===(g=ce.carVersionFeatures[43])||void 0===g?void 0:g.value,feature:{id:44}},{value:null===ce||void 0===ce||null===(f=ce.carVersionFeatures[29])||void 0===f?void 0:f.value,feature:{id:30}},{value:null===ce||void 0===ce||null===(v=ce.carVersionFeatures[22])||void 0===v?void 0:v.value,feature:{id:23}},{value:null===ce||void 0===ce||null===(b=ce.carVersionFeatures[25])||void 0===b?void 0:b.value,feature:{id:26}},{value:null===ce||void 0===ce||null===(w=ce.carVersionFeatures[47])||void 0===w?void 0:w.value,feature:{id:48}},{value:null===ce||void 0===ce||null===(y=ce.carVersionFeatures[55])||void 0===y?void 0:y.value,feature:{id:56}},{value:null===ce||void 0===ce||null===(j=ce.carVersionFeatures[2])||void 0===j?void 0:j.value,feature:{id:3}},{value:null===ce||void 0===ce||null===(N=ce.carVersionFeatures[33])||void 0===N?void 0:N.value,feature:{id:34}},{value:null===ce||void 0===ce||null===(k=ce.carVersionFeatures[45])||void 0===k?void 0:k.value,feature:{id:46}},{value:null===ce||void 0===ce||null===(C=ce.carVersionFeatures[36])||void 0===C?void 0:C.value,feature:{id:37}},{value:null===ce||void 0===ce||null===(D=ce.carVersionFeatures[39])||void 0===D?void 0:D.value,feature:{id:40}},{value:null===ce||void 0===ce||null===(A=ce.carVersionFeatures[37])||void 0===A?void 0:A.value,feature:{id:38}},{value:null===ce||void 0===ce||null===(S=ce.carVersionFeatures[38])||void 0===S?void 0:S.value,feature:{id:39}},{value:null===ce||void 0===ce||null===(B=ce.carVersionFeatures[27])||void 0===B?void 0:B.value,feature:{id:28}},{value:null===ce||void 0===ce||null===(z=ce.carVersionFeatures[50])||void 0===z?void 0:z.value,feature:{id:51}},{value:null===ce||void 0===ce||null===(F=ce.carVersionFeatures[26])||void 0===F?void 0:F.value,feature:{id:27}},{value:null===ce||void 0===ce||null===(E=ce.carVersionFeatures[48])||void 0===E?void 0:E.value,feature:{id:49}},{value:null===ce||void 0===ce||null===(M=ce.carVersionFeatures[14])||void 0===M?void 0:M.value,feature:{id:15}},{value:null===ce||void 0===ce||null===(I=ce.carVersionFeatures[42])||void 0===I?void 0:I.value,feature:{id:43}},{value:null===ce||void 0===ce||null===(L=ce.carVersionFeatures[23])||void 0===L?void 0:L.value,feature:{id:24}}],numberofdoor:{id:ce.dimension.numberofdoor.id},numberofseating:{id:ce.dimension.numberofseating.id},numberofcylinder:{id:ce.engine.numberofcylinder.id},fuelType:{id:ce.fuelType.id},vehicleType:{id:ce.vehicleType.id},transmission:{id:ce.transmission.id},wheelDriveType:{id:ce.wheelDriveType.id},featureAds:!1,displacementcc:ce.engine.displacement,image:l,carVersion:{id:ce.id},status:!0,userType:"user"};try{if((await s.A.post("".concat("https://www.arabiawheel.com/automotor","/api/vehicles/createVehicle"),e,{headers:{Authorization:"Bearer ".concat(K)}})).data){if(r.oR.success("Your Car Added Successfully"),ne){var T,P,R,q,V,_,O,H;await s.A.put("\n            ".concat("https://www.arabiawheel.com/automotor","/carVersions/").concat(null===ce||void 0===ce?void 0:ce.id),{vehicleType:{id:null===ce||void 0===ce||null===(T=ce.vehicleType)||void 0===T?void 0:T.id},transmission:{id:ce.transmission.id},fuelType:{id:ce.fuelType.id},engine:{displacement:ce.engine.displacement,numberofcylinder:{id:null===ce||void 0===ce||null===(P=ce.engine)||void 0===P||null===(R=P.numberofcylinder)||void 0===R?void 0:R.id}},wheelDriveType:{id:null===ce||void 0===ce||null===(q=ce.wheelDriveType)||void 0===q?void 0:q.id},dimension:{numberofdoor:{id:null===ce||void 0===ce||null===(V=ce.dimension)||void 0===V||null===(_=V.numberofdoor)||void 0===_?void 0:_.id},numberofseating:{id:null===ce||void 0===ce||null===(O=ce.dimension)||void 0===O||null===(H=O.numberofseating)||void 0===H?void 0:H.id}}})}ie(!1),pe({city:"",cityName:"",fuelTypeName:"",transmissionName:"",vehicleTypeName:"",colorId:"",priceVehicle:"",mileage:"",noOfAccident:"",noOfOwners:"",description:"",selectedYear:Number(G),id:null,bi
1ddingVehicle:!1,vehicleCategory:"",engine:{displacement:""},dimension:{numberofdoor:{id:null},numberofcylinder:{id:null}},fuelType:{id:null},vehicleType:{id:null},wheelDriveType:{id:null},transmission:{id:null},carVersionFeatures:[{id:1871,feature:{id:1},value:null},{id:1872,feature:{id:2},value:null},{id:1873,feature:{id:3},value:null},{id:1874,feature:{id:4},value:null},{id:1875,feature:{id:5},value:null},{id:1876,feature:{id:6},value:null},{id:1877,feature:{id:7},value:null},{id:1878,feature:{id:8},value:null},{id:1879,feature:{id:9},value:null},{id:1880,feature:{id:10},value:null},{id:1881,feature:{id:11},value:null},{id:1882,feature:{id:12},value:null},{id:1883,feature:{id:13},value:null},{id:1884,feature:{id:14},value:null},{id:1885,feature:{id:15},value:null},{id:1886,feature:{id:16},value:null},{id:1887,feature:{id:17},value:null},{id:1888,feature:{id:18},value:null},{id:1889,feature:{id:19},value:null},{id:1890,feature:{id:20},value:null},{id:1891,feature:{id:21},value:null},{id:1892,feature:{id:22},value:null},{id:1893,feature:{id:23},value:null},{id:1894,feature:{id:24},value:null},{id:1895,feature:{id:25},value:null},{id:1896,feature:{id:26},value:null},{id:1897,feature:{id:27},value:null},{id:1898,feature:{id:28},value:null},{id:1899,feature:{id:29},value:null},{id:1900,feature:{id:30},value:null},{id:1901,feature:{id:31},value:null},{id:1902,feature:{id:32},value:null},{id:1903,feature:{id:33},value:null},{id:1904,feature:{id:34},value:null},{id:1905,feature:{id:35},value:null},{id:1906,feature:{id:36},value:null},{id:1907,feature:{id:37},value:null},{id:1908,feature:{id:38},value:null},{id:1909,feature:{id:39},value:null},{id:1910,feature:{id:40},value:null},{id:1911,feature:{id:41},value:null},{id:1912,feature:{id:42},value:null},{id:1913,feature:{id:43},value:null},{id:1914,feature:{id:44},value:null},{id:1915,feature:{id:45},value:null},{id:1916,feature:{id:46},value:null},{id:1917,feature:{id:47},value:null},{id:1918,feature:{id:48},value:null},{id:1919,feature:{id:49},value:null},{id:1920,feature:{id:50},value:null},{id:1921,feature:{id:51},value:null},{id:1922,feature:{id:52},value:null},{id:1923,feature:{id:53},value:null},{id:1924,feature:{id:54},value:null},{id:1925,feature:{id:55},value:null},{id:1926,feature:{id:56},value:null},{id:1927,feature:{id:57},value:null},{id:1928,feature:{id:58},value:null},{id:1929,feature:{id:59},value:null},{id:1930,feature:{id:60},value:null},{id:1931,feature:{id:61},value:null},{id:1932,feature:{id:62},value:null},{id:1933,feature:{id:63},value:null},{id:1934,feature:{id:64},value:null},{id:1935,feature:{id:65},value:null}]}),Q(""),Le([]),te(""),X(0),oe(!1),$(null),window.scrollTo({top:0}),Lt("".concat(me("routes.DealerAddcar","/dealer/addcar"))),se("Year")}}catch(W){console.error("Error submitting data:",W),(0,r.oR)("Error during submitting car data,Please try again!"),Ae(!1)}}}catch(W){console.error("Error during compression or upload:",W),r.oR.error("There was an error uploading images.")}finally{Ae(!1)}},className:"disabled:bg-[#1876D6]/70 bg-[#0473E9] px-3 py-2 2xl:px-4 4xl:px-5 4xl:py-3 5xl:px-6 5xl:py-4 6xl:py-5 2xl:py-[10px] 2xl:text-lg 4xl:text-xl 5xl:text-[22px] 6xl:text-[28px]  rounded-md font-sans text-white xxxsm:w-full md:w-auto",children:De?(0,M.jsx)("div",{className:"font-sans text-white",children:"Submitting..."}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)("div",{className:"xxxsm:hidden md:block",children:me("submit & continue")}),(0,M.jsx)("div",{className:"md:hidden xxxsm:block",children:me("post ad")})]})})})})]}),_e&&(0,M.jsx)("div",{ref:He,className:"h-[100vh] z-50 w-[100%] ".concat(we,"  md:grid place-items-center   fixed top-0 left-0 opacity-100 xxxsm:hidden"),style:{zIndex:"9999"},children:(0,M.jsxs)("div",{ref:We,className:"md:w-[90%] lg:w-[67%] relative transition duration-1000 ease-in-out rounded-md h-[90vh] bg-white flex flex-col z-50",children:[(0,M.jsx)(ye.A,{}),(0,M.jsxs)("div",{className:"flex w-[100%] border-b  min-h-[80%]",children:[(0,M.jsx)("div",{className:"w-[25%] grid place-items-center border-r h-[100%] border-gray-200 uppercase font-bold font-sans text-gray-500 ",children:(0,M.jsx)("div",{className:"h-[90%]  w-[90%] box-border overflow-auto overflow-x-hidden m-auto my-auto ",children:qe.map(((e,t)=>(0,M.jsxs)("div",{onClick:()=>Pe(e),className:"flex mt-[1%] cursor-pointer items-center p-2 border border-transparent hover:text-[#518ecb] hover:bg-[#eaf0ff] hover:border hover:border-[#d1deff]  ".concat("ar"===ue.language?"ml-[5%]":"mr-[5%]"," justify-between ").concat(e==G?" bg-[#eaf0ff] border border-[#d1deff] text-[#518ecb]":"text-[#434343] hover:text-[#518ecb]"," "),children:[(0,M.jsx)("p",{className:"font-normal  font-sans text-sm  ",children:e}),(0,M.jsx)(n.ye6,{fontSize:20,className:"".concat(window.isArabic?"hidden":"block")}),(0,M.jsx)(n.vMW,{fontSize:20,className:"".concat(window.isArabic?"block":"hidden")})]},t)))})}),(0,M.jsxs)("div",{className:"w-[25%]   border-r border-gray-200 h-[100%] ".concat(G>0&&!J&&"bg-gray-200"),children:[G>0&&(0,M.jsx)("div",{className:"w-full  sticky top-0  flex py-3 ".concat("ar"===ue.language?"pr-3 pl-8":"pl-3 pr-8"),children:(0,M.jsxs)("div",{className:"w-full border border-[#efefef] bg-white rounded-md flex gap-1 items-center py-1 focus-within:border-[#0173E9] focus-within:ring-1 focus-within:ring-[#0173E9]",children:[(0,M.jsx)(Ce.zfp,{className:"".concat("ar"===ue.language?"mr-3 scale-x-[-1]":"ml-3","  text-[#373737] text-opacity-60 text-[19px] translate-y-[2px]")}),(0,M.jsx)("input",{type:"text",placeholder:me("search by typing"),className:"outline-none w-full p-1 rounded-md",value:ot,onChange:e=>ct(e.target.value)})]})}),(0,M.jsx)("div",{className:" z-50 md:h-[82%] lg:h-[85%] 2xl:h-[87%]    w-[90%] flex flex-col gap-7 box-border overflow-auto overflow-x-hidden m-auto my-auto   ",children:G>0&&(0,M.jsx)(M.Fragment,{children:pt.length>0||mt.length>0?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)("div",{children:[(0,M.jsx)("h1",{className:"text-sm pl-2 font-bold text-gray-800",children:me("popular")}),pt.map(((e,t)=>(0,M.jsxs)("div",{onClick:()=>Re(e.name),className:"flex mt-[1%] cursor-pointer items-center p-2 border border-transparent hover:text-[#518ecb] hover:bg-[#eaf0ff] hover:border hover:border-[#d1deff]  ".concat("ar"===ue.language?"ml-[5%]":"mr-[5%]"," justify-between ").concat(J==e.name.id?"bg-[#eaf0ff] border border-[#d1deff] text-[#518ecb] ":"text-[#434343] hover:text-[#518ecb]"," "),children:[(0,M.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,M.jsx)("p",{className:"text-[20px]",children:e.icon}),(0,M.jsx)("p",{className:"text-sm",children:me("Make.".concat(e.name.en))})]}),(0,M.jsx)(n.ye6,{fontSize:20,className:"".concat(window.isArabic?"hidden":"block")}),(0,M.jsx)(n.vMW,{fontSize:20,className:"".concat(window.isArabic?"block":"hidden")})]})))]}),(0,M.jsxs)("div",{children:[(0,M.jsx)("h1",{className:"text-sm pl-2 font-bold text-gray-800",children:me("others")}),mt.map(((e,t)=>(0,M.jsxs)("div",{onClick:()=>Re(e.name),className:"flex mt-[1%] cursor-pointer items-center p-2 border border-transparent hover:text-[#518ecb] hover:bg-[#eaf0ff] hover:border hover:border-[#d1deff] ".concat("ar"===ue.language?"ml-[5%]":"mr-[5%]"," justify-between ").concat(J==e.name?" bg-[#eaf0ff] border border-[#d1deff] text-[#518ecb] ":"text-[#434343] hover:text-[#518ecb]"," "),children:[(0,M.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,M.jsx)("p",{className:"text-[20px]",children:e.icon}),(0,M.jsx)("p",{className:"text-sm ",children:me("Make.".concat(e.name.en))})]}),(0,M.jsx)(n.ye6,{fontSize:20,className:"".concat(window.isArabic?"hidden":"block")}),(0,M.jsx)(n.vMW,{fontSize:20,className:"".concat(window.isArabic?"block":"hidden")})]})))]})]}):(0,M.jsx)("div",{className:" flex flex-grow justify-center items-center ",children:(0,M.jsx)("p",{className:"text-gray-500 text-lg",children:me("No results found")})})})})]}),(0,M.jsxs)("div",{className:"w-[25%]  border-r h-[100%] border-gray-200 ".concat(J&&!ee&&"bg-gray-200"),children:[J?(0,M.jsx)("div",{className:"w-full  sticky top-0  flex py-3 ".concat("ar"===ue.language?"pr-3 pl-8":"pl-3 pr-8"),children:(0,M.jsxs)("div",{className:"w-full border border-[#efefef] bg-white rounded-md flex gap-1 items-center py-1 focus-within:border-[#0173E9] focus-within:ring-1 focus-within:ring-[#0173E9]",children:[(0,M.jsx)(Ce.zfp,{className:"".concat("ar"===ue.language?"mr-3 scale-x-[-1]":"ml-3","  text-[#373737] text-opacity-60 text-[19px] translate-y-[2px]")}),(0,M.jsx)("input",{type:"text",placeholder:me("search by typing"),className:"outline-none w-full p-1 rounded-md",value:ut,onChange:e=>ht(e.target.value)})]})}):"",J?(0,M.jsx)("div",{className:"z-50 md:h-[82%] lg:h-[85%] 2xl:h-[87%] w-[90%] flex flex-col gap-7 box-border overflow-auto overflow-x-hidden m-auto my-auto",children:ft.length>0||vt.length>0?(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)("div",{children:[(0,M.jsx)("h1",{className:"text-sm pl-2 font-bold text-gray-800",children:me("popular")}),(null===(H=fe.default[J])||void 0===H||null===(W=H.popular)||void 0===W?void 0:W.length)>0&&(0,M.jsx)(M.Fragment,{children:ft.map(((e,t)=>(0,M.jsxs)("button",{onClick:()=>{jt(e)},className:"flex mt-[1%] w-full cursor-pointer items-center p-2 border border-transparent hover:text-[#518ecb] hover:bg-[#eaf0ff] hover:border hover:border-[#d1deff] ".concat("ar"===ue.language?"ml-[5%]":"mr-[5%]"," justify-between ").concat(ee==e.en?" bg-[#eaf0ff] border border-[#d1deff] text-[#518ecb] ":"text-[#434343] hover:text-[#518ecb]"," "),children:[(0,M.jsxs)("p",{className:" text-sm font-normal font-sans",children:[" ",me("Model.".concat(e.en.trim()))]}),(0,M.jsx)(n.ye6,{fontSize:20,className:"".concat(window.isArabic?"hidden":"block")}),(0,M.jsx)(n.vMW,{fontSize:20,className:"".concat(window.isArabic?"block":"hidden")})]},t)))})]}),(0,M.jsx)("div",{children:(null===(U=fe.default[J])||void 0===U||null===(Y=U.others)||void 0===Y?void 0:Y.length)>0&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)("h1",{className:"text-sm pl-2 font-bold",children:me("others")}),vt.map(((e,t)=>(0,M.jsxs)("button",{onClick:()=>{jt(e)},className:"flex mt-[1%] w-full cursor-pointer items-center p-2 border border-transparent hover:text-[#518ecb] hover:bg-[#eaf0ff] hover:border hover:border-[#d1deff] ".concat("ar"===ue.language?"ml-[5%]":"mr-[5%]"," justify-between ").concat(ee==e.en?" bg-[#eaf0ff] border border-[#d1deff] text-[#518ecb] ":"text-[#434343] hover:text-[#518ecb]"," "),children:[(0,M.jsx)("p",{className:"text-sm font-normal font-sans",children:me("Model.".concat(e.en.trim()))}),(0,M.jsx)(n.ye6,{fontSize:20,className:"".concat(window.isArabic?"hidden":"block")}),(0,M.jsx)(n.vMW,{fontSize:20,className:"".concat(window.isArabic?"block":"hidden")})]},t)))]})})]}):(0,M.jsx)("div",{className:" flex flex-grow justify-center items-center ",children:(0,M.jsx)("p",{className:"text-gray-500 text-lg",children:me("No results found")})})}):""]}),(0,M.jsxs)("div",{className:"w-[25%]  border-r h-[100%] border-gray-200 ".concat(ee&&!xe&&"bg-gray-200"),children:[ee?(0,M.jsx)("div",{className:"w-full  sticky top-0  flex py-3  ".concat("ar"===ue.language?"pr-3 pl-8":"pl-3 pr-8"),children:(0,M.jsxs)("div",{className:"w-full border border-[#efefef] bg-white rounded-md flex gap-1 items-center py-1 focus-within:border-[#0173E9] focus-within:ring-1 focus-within:ring-[#0173E9]",children:[(0,M.jsx)(Ce.zfp,{className:"".concat("ar"===ue.language?"mr-3 scale-x-[-1]":"ml-3","  text-[#373737] text-opacity-60 text-[19px] translate-y-[2px]")}),(0,M.jsx)("input",{type:"text",placeholder:me("search by typing"),className:"outline-none w-full p-1 rounded-md",value:bt,onCh
1ange:e=>wt(e.target.value)})]})}):"",ee&&(0,M.jsx)("div",{className:" z-50 md:h-[82%] lg:h-[85%] 2xl:h-[87%]  w-[90%] box-border overflow-auto overflow-x-hidden m-auto  my-auto",children:he?(0,M.jsx)("div",{className:"animate-spin  rounded-full h-16 w-16  border-t-8 border-l-8 mt-[80%] ml-[37%]  border-white"}):(0,M.jsx)(M.Fragment,{children:yt&&yt.length>0?yt.map((e=>(0,M.jsx)("div",{onClick:()=>Nt(e),className:"".concat(xe===e.name?" bg-[#eaf0ff] border border-[#d1deff] text-[#518ecb] ":"text-[#434343] hover:text-[#518ecb]"," mt-[1%] cursor-pointer border border-transparent hover:text-[#518ecb] hover:bg-[#eaf0ff] hover:border hover:border-[#d1deff] text-left ").concat("ar"===ue.language?"ml-[5%]":"mr-[5%]"," p-2 w-full"),value:e.name,arabic_name:e.car_version_Arb_name,year_name:e.year,id:e.id,children:(0,M.jsx)("p",{className:"text-sm font-normal font-sans",children:e.name})},e.name))):(0,M.jsx)("div",{className:" flex flex-grow justify-center items-center ",children:(0,M.jsx)("p",{className:"text-gray-500 text-lg",children:me("No results found")})})})})]})]}),(0,M.jsx)("div",{ref:Ge,className:"min-h-[10%] grid place-items-center",children:(0,M.jsx)("button",{onClick:()=>{if(Oe(!1),Qe(""),lt(""),dt(""),!xe.length){const e=Se.find((e=>"Other"===e.name));e&&Nt(e)}},className:"xxxsm:px-6 py-1 md:px-8 md:py-[6px]  text-white bg-[#233d7b] rounded-md ".concat(ee?"bg-[#233d7b]":"bg-[#233d7b]/40"," ").concat(ee?"cursor-pointer":"cursor-not-allowed"),disabled:!ee,children:me("done")})}),(0,M.jsx)("div",{className:"top-3 absolute hover:text-[#434343] hover:bg-gray-300 px-1 py-1 rounded-md flex justify-center items-center\n                ".concat("ar"===ue.language?"left-4 right-auto":"right-4 left-auto"),children:(0,M.jsx)("button",{onClick:$e,children:(0,M.jsx)(be.j55,{className:"font-extrabold"})})})]})}),_e&&(0,M.jsx)("div",{ref:Ye,style:{zIndex:1e3},className:"fixed top-0  h-screen w-full left-0 z-60 inset-0 bg-black bg-opacity-65 md:hidden ",children:(0,M.jsx)("div",{className:"fixed top-[90px] inset-0 flex flex-col  z-50  ",style:{animation:"slide-up 0.3s ease-out",zIndex:1001},children:(0,M.jsxs)("div",{ref:Ue,className:"bg-[#F8F8F8] rounded-t-lg px-4 pb-[64px] shadow-lg w-full h-full overflow-y-auto",style:{animation:"slide-up 0.3s ease-out",zIndex:1001},children:[(0,M.jsx)("div",{className:"sticky top-0 flex flex-col",children:(0,M.jsxs)("div",{className:"flex items-center justify-between  py-3 border-b border-[#efefef] bg-[#F8F8F8]",children:[(0,M.jsxs)("div",{className:"flex gap-1 items-center",children:[(0,M.jsx)("div",{children:"Year"!==ae&&(0,M.jsx)(Ce.pRN,{size:19,className:"".concat("ar"===ue.language?"rotate-180":"none"),onClick:()=>{"Make"===ae?se("Year"):"Model"===ae?se("Make"):"Version"===ae&&se("Model"),Qe(""),lt(""),dt("")}})}),(0,M.jsxs)("h2",{className:"text-[15px] font-bold text-[#373737] ",children:["Year"===ae&&me("select year"),"Make"===ae&&me("select make"),"Model"===ae&&me("select model"),"Version"===ae&&me("select version")]})]}),(0,M.jsx)("button",{onClick:$e,className:"hover:text-gray-800 text-[#1877F2] text-[15px] font-mono font-semibold",children:me("cancel")})]})}),"Year"===ae&&(0,M.jsxs)("div",{children:[(0,M.jsx)("h3",{className:"text-sm font-bold text-[#1877F2] pb-1",children:me("year")}),qe.map(((e,t)=>(0,M.jsxs)("div",{onClick:()=>{Pe(e),se("Make")},className:"flex items-center justify-between px-2 py-3 border-b border-[#efefef] cursor-pointer ".concat(e===G?"text-[#518ecb] bg-[#eaf0ff] border border-[#d1deff] rounded-sm":"text-[#373737]"),children:[(0,M.jsx)("p",{className:"text-[15px]",children:e}),(0,M.jsx)(n.ye6,{fontSize:19,className:"".concat(window.isArabic?"hidden":"block"," ")}),(0,M.jsx)(n.vMW,{fontSize:19,className:"".concat(window.isArabic?"block":"hidden"," ")})]},t)))]}),"Make"===ae&&(0,M.jsxs)("div",{children:[(0,M.jsx)("div",{className:"flex items-center justify-between py-4 bg-[#F8F8F8]",children:(0,M.jsxs)("div",{className:"w-full border border-[#efefef] bg-white rounded-md flex gap-1 items-center focus-within:border-[#0173E9] focus-within:ring-1 focus-within:ring-[#0173E9]",children:[(0,M.jsx)(Ce.zfp,{className:"".concat("ar"===ue.language?"rotate-180 scale-y-[-1] mr-2":"ml-2","  text-[#373737] text-opacity-60 text-[17px]")}),(0,M.jsx)("input",{type:"text",placeholder:me("search make"),className:"outline-none w-full p-1 rounded-md",value:Ze,onCh
1ange:e=>Qe(e.target.value)})]})}),(0,M.jsxs)("div",{children:[(0,M.jsx)("h3",{className:"text-sm font-bold text-[#1877F2] pb-1",children:me("popular makes")}),et.map(((e,t)=>(0,M.jsxs)("div",{onClick:()=>{Re(e.name),se("Model")},className:"flex items-center justify-between px-2 py-3 border-b border-[#efefef] cursor-pointer ".concat(J==e.name.id?"text-[#518ecb] bg-[#eaf0ff] border border-[#d1deff] rounded-sm":"text-[#373737]"),children:[(0,M.jsx)("p",{className:" text-[15px]",children:me("Make.".concat(e.name.en))}),(0,M.jsx)(n.ye6,{fontSize:19,className:"".concat(window.isArabic?"hidden":"block"," ")}),(0,M.jsx)(n.vMW,{fontSize:19,className:"".concat(window.isArabic?"block":"hidden"," ")})]},t)))]}),(0,M.jsxs)("div",{children:[(0,M.jsx)("h3",{className:"text-sm font-bold text-[#1877F2] pb-1 mt-[2%]",children:me("others")}),tt.map(((e,t)=>(0,M.jsxs)("div",{onClick:()=>{Re(e.name),se("Model")},className:"flex items-center justify-between px-2 py-3 border-b border-[#efefef] cursor-pointer ".concat(J==e.name.id?"text-[#518ecb] bg-[#eaf0ff] border border-[#d1deff] rounded-sm":"text-[#373737]"),children:[(0,M.jsx)("p",{className:" text-[15px]",children:me("Make.".concat(e.name.en))}),(0,M.jsx)(n.ye6,{fontSize:19,className:"".concat(window.isArabic?"hidden":"block"," ")}),(0,M.jsx)(n.vMW,{fontSize:19,className:"".concat(window.isArabic?"block":"hidden"," ")})]},t)))]})]}),"Model"===ae&&J&&(0,M.jsxs)("div",{children:[(0,M.jsx)("div",{className:"flex items-center justify-between  py-4 bg-[#F8F8F8]",children:(0,M.jsxs)("div",{className:"w-full border border-[#efefef] bg-white rounded-md flex gap-1 items-center focus-within:border-[#0173E9] focus-within:ring-1 focus-within:ring-[#0173E9]",children:[(0,M.jsx)(Ce.zfp,{className:"".concat("ar"===ue.language?"rotate-180 scale-y-[-1] mr-2":"ml-2","  text-[#373737] text-opacity-60 text-[17px]")}),(0,M.jsx)("input",{type:"text",placeholder:me("search model"),className:"outline-none w-full p-1 rounded-md",value:xt,onChange:e=>lt(e.target.value)})]})}),(0,M.jsxs)("div",{children:[(0,M.jsx)("h3",{className:"text-sm font-bold text-[#1877F2] pb-1",children:me("popular model")}),st.map(((e,t)=>(0,M.jsxs)("div",{onClick:()=>{jt(e),se("Version")},className:"flex items-center justify-between px-2 py-3 border-b border-[#efefef] cursor-pointer ".concat(ee===e.en?"text-[#518ecb] bg-[#eaf0ff] border border-[#d1deff] rounded-sm":"text-[#373737]"),children:[(0,M.jsx)("p",{className:" text-[15px]",children:me("Model.".concat(e.en.trim()))}),(0,M.jsx)(n.ye6,{fontSize:19,className:"".concat(window.isArabic?"hidden":"block"," ")}),(0,M.jsx)(n.vMW,{fontSize:19,className:"".concat(window.isArabic?"block":"hidden"," ")})]},t)))]}),(0,M.jsxs)("div",{children:[(0,M.jsx)("h3",{className:"text-sm font-bold text-[#1877F2] pb-1 mt-[2%]",children:me("others")}),rt.map(((e,t)=>(0,M.jsxs)("div",{onClick:()=>{jt(e),se("Version")},className:"flex items-center justify-between px-2 py-3 border-b border-[#efefef] cursor-pointer ".concat(ee===e.en?"text-[#518ecb] bg-[#eaf0ff] border border-[#d1deff] rounded-sm":"text-[#373737]"),children:[(0,M.jsx)("p",{className:" text-[15px]",children:me("Model.".concat(e.en.trim()))}),(0,M.jsx)(n.ye6,{fontSize:19,className:"".concat(window.isArabic?"hidden":"block"," ")}),(0,M.jsx)(n.vMW,{fontSize:19,className:"".concat(window.isArabic?"block":"hidden"," ")})]},t)))]})]}),"Version"===ae&&ee&&(he?(0,M.jsx)("div",{className:"w-full h-full grid place-items-center",children:(0,M.jsx)("div",{className:"animate-spin  rounded-full h-16 w-16  border-t-8 border-l-8   border-[#0173E9]"})}):(0,M.jsxs)("div",{className:"",children:[(0,M.jsx)("div",{className:"flex items-center justify-between py-4 bg-[#F8F8F8]",children:(0,M.jsxs)("div",{className:"w-full border border-[#efefef] bg-white rounded-md flex gap-1 items-center focus-within:border-[#0173E9] focus-within:ring-1 focus-within:ring-[#0173E9]",children:[(0,M.jsx)(Ce.zfp,{className:"".concat("ar"===ue.language?"rotate-180 scale-y-[-1] mr-2":"ml-2","  text-[#373737] text-opacity-60 text-[17px]")}),(0,M.jsx)("input",{type:"text",placeholder:me("search car version"),className:"outline-none w-full p-1 rounded-md",value:it,onChange:e=>dt(e.target.value)})]})}),nt&&nt.length>0?nt.map((e=>(0,M.jsx)("div",{onClick:async()=>{await kt(e),Oe(!1)},className:"flex items-center text-[#373737] text-[15px] px-2 py-3 border-b border-[#efefef] cursor-pointer ".concat(xe===e.name?"text-[#518ecb] bg-[#eaf0ff] border border-[#d1deff] rounded-sm":"text-[#373737]"),children:e.name},e.id))):(0,M.jsx)("div",{className:"text-center text-black py-4",children:"Version Not Found"})]})),(0,M.jsx)("div",{className:"fixed bottom-0 left-0 bg-[#F8F8F8] p-4 w-full flex justify-center  ",children:(0,M.jsx)("button",{onClick:()=>
1{if(Oe(!1),Qe(""),lt(""),dt(""),!xe.length){const e=Se.find((e=>"Other"===e.name));e&&kt(e)}},disabled:Z.length<1,className:"px-8 py-2 text-sm disabled:bg-[#0173E9]/50 font-medium text-white  rounded-md bg-[#0173E9] w-full",children:me("done")})})]})})})]})};var Ae=x(35475);const Se=()=>{const{t:e}=(0,p.Bd)(),t=(0,u.zy)().pathname;return(0,M.jsx)("div",{className:"sticky top-0 z-50  bg-white dark:bg-dark-from shadow-md ",children:(0,M.jsxs)("div",{className:"flex sticky top-0  items-center px-3 xxxsm:justify-end md:justify-start bg-white dark:bg-dark-from  py-3",children:["/dealer/dashboard"==t&&(0,M.jsxs)(Ae.N_,{to:e("routes.Home","/"),className:"flex  gap-2 items-center text-2xl ",children:[(0,M.jsx)("p",{className:"text-black dark:text-main-heading-white italic font-medium text-sm md:text-base 2xl:text-lg 3xl:text-xl 4xl:text-[22px] 5xl:text-2xl 6xl:text-[29px]",children:e("powered by")}),(0,M.jsx)("div",{className:"text-black",children:(0,M.jsx)("img",{src:"https://res.cloudinary.com/dr3ie9gpz/image/upload/v1739364950/bxqpgiqdq33cvtq1wwbo.webp",className:"max-h-[39px] min-h-[39px]  xxxsm:max-w-[115px] xxxsm:min-w-[115px] xsm:max-w-[120px] xsm:min-w-[120px] sm:max-w-[125px] sm:min-w-[125px] xl:max-w-[135px] xl:min-w-[135px] 2xl:max-h-[43px] 2xl:min-h-[43px] 3xl:max-h-[46px] 3xl:min-h-[46px] 4xl:max-h-[50px] 4xl:min-h-[50px] 5xl:max-h-[55px] 5xl:min-h-[55px] 6xl:max-h-[62px] 6xl:min-h-[62px] 2xl:max-w-[150px] 2xl:min-w-[150px] 3xl:max-w-[185px] 3xl:min-w-[185px] 5xl:max-w-[195px] 5xl:min-w-[195px] 6xl:max-w-[220px] 6xl:min-w-[220px]",alt:"Compny Logo"})})]})||"/dealer/addcar"==t&&(0,M.jsxs)(Ae.N_,{to:e("routes.Home","/"),className:"flex gap-2 items-center text-2xl",children:[(0,M.jsx)("p",{className:"text-black dark:text-main-heading-white italic font-medium text-sm md:text-base 2xl:text-lg 3xl:text-xl 4xl:text-[22px] 5xl:text-2xl 6xl:text-[29px]",children:e("powered by")}),(0,M.jsx)("div",{className:"text-black",children:(0,M.jsx)("img",{src:"https://res.cloudinary.com/dr3ie9gpz/image/upload/v1739364950/bxqpgiqdq33cvtq1wwbo.webp",className:"max-h-[39px] min-h-[39px] xxxsm:max-w-[115px] xxxsm:min-w-[115px] xsm:max-w-[120px] xsm:min-w-[120px] sm:max-w-[125px] sm:min-w-[125px] xl:max-w-[135px] xl:min-w-[135px] 2xl:max-h-[43px] 2xl:min-h-[43px] 3xl:max-h-[46px] 3xl:min-h-[46px] 4xl:max-h-[50px] 4xl:min-h-[50px] 5xl:max-h-[55px] 5xl:min-h-[55px] 6xl:max-h-[62px] 6xl:min-h-[62px] 2xl:max-w-[150px] 2xl:min-w-[150px] 3xl:max-w-[185px] 3xl:min-w-[185px] 5xl:max-w-[195px] 5xl:min-w-[195px] 6xl:max-w-[220px] 6xl:min-w-[220px]",alt:"Compny Logo"})})]})||"/ar/dealer/dashboard"==t&&(0,M.jsxs)(Ae.N_,{to:e("routes.Home","/"),className:"flex gap-2 items-center text-2xl ",children:[(0,M.jsx)("p",{className:"text-black dark:text-main-heading-white italic font-medium text-sm md:text-base 2xl:text-lg 3xl:text-xl 4xl:text-[22px] 5xl:text-2xl 6xl:text-[29px]",children:e("powered by")}),(0,M.jsx)("div",{className:"text-black",children:(0,M.jsx)("img",{src:"https://res.cloudinary.com/dr3ie9gpz/image/upload/v1739364950/bxqpgiqdq33cvtq1wwbo.webp",className:"max-h-[39px] min-h-[39px] xxxsm:max-w-[115px] xxxsm:min-w-[115px] xsm:max-w-[120px] xsm:min-w-[120px] sm:max-w-[125px] sm:min-w-[125px] xl:max-w-[135px] xl:min-w-[135px] 2xl:max-h-[43px] 2xl:min-h-[43px] 3xl:max-h-[46px] 3xl:min-h-[46px] 4xl:max-h-[50px] 4xl:min-h-[50px] 5xl:max-h-[55px] 5xl:min-h-[55px] 6xl:max-h-[62px] 6xl:min-h-[62px] 2xl:max-w-[150px] 2xl:min-w-[150px] 3xl:max-w-[185px] 3xl:min-w-[185px] 5xl:max-w-[195px] 5xl:min-w-[195px] 6xl:max-w-[220px] 6xl:min-w-[220px]",alt:"Compny Logo"})})]})||"/dealer/profile"==t&&(0,M.jsxs)(Ae.N_,{to:e("routes.Home","/"),className:"flex gap-2 items-center text-2xl ",children:[(0,M.jsx)("p",{className:"text-black  dark:text-main-heading-white italic font-medium text-sm md:text-base 2xl:text-lg 3xl:text-xl 4xl:text-[22px] 5xl:text-2xl 6xl:text-[29px]",children:e("powered by")}),(0,M.jsx)("div",{className:"text-black",children:(0,M.jsx)("img",{src:"https://res.cloudinary.com/dr3ie9gpz/image/upload/v1739364950/bxqpgiqdq33cvtq1wwbo.webp",className:"max-h-[39px] min-h-[39px] xxxsm:max-w-[115px] xxxsm:min-w-[115px] xsm:max-w-[120px] xsm:min-w-[120px] sm:max-w-[125px] sm:min-w-[125px] xl:max-w-[135px] xl:min-w-[135px] 2xl:max-h-[43px] 2xl:min-h-[43px] 3xl:max-h-[46px] 3xl:min-h-[46px] 4xl:max-h-[50px] 4xl
1:min-h-[50px] 5xl:max-h-[55px] 5xl:min-h-[55px] 6xl:max-h-[62px] 6xl:min-h-[62px] 2xl:max-w-[150px] 2xl:min-w-[150px] 3xl:max-w-[185px] 3xl:min-w-[185px] 5xl:max-w-[195px] 5xl:min-w-[195px] 6xl:max-w-[220px] 6xl:min-w-[220px]",loading:"lazy",alt:"Compny Logo"})})]})||"/ar/dealer/profile"==t&&(0,M.jsxs)(Ae.N_,{to:e("routes.Home","/"),className:"flex gap-2 items-center text-2xl ",children:[(0,M.jsx)("p",{className:"text-black dark:text-main-heading-white italic font-medium text-sm md:text-base 2xl:text-lg 3xl:text-xl 4xl:text-[22px] 5xl:text-2xl 6xl:text-[29px]",children:e("powered by")}),(0,M.jsx)("div",{className:"text-black",children:(0,M.jsx)("img",{src:"https://res.cloudinary.com/dr3ie9gpz/image/upload/v1739364950/bxqpgiqdq33cvtq1wwbo.webp",className:"max-h-[39px] min-h-[39px] xxxsm:max-w-[115px] xxxsm:min-w-[115px] xsm:max-w-[120px] xsm:min-w-[120px] sm:max-w-[125px] sm:min-w-[125px] xl:max-w-[135px] xl:min-w-[135px] 2xl:max-h-[43px] 2xl:min-h-[43px] 3xl:max-h-[46px] 3xl:min-h-[46px] 4xl:max-h-[50px] 4xl:min-h-[50px] 5xl:max-h-[55px] 5xl:min-h-[55px] 6xl:max-h-[62px] 6xl:min-h-[62px] 2xl:max-w-[150px] 2xl:min-w-[150px] 3xl:max-w-[185px] 3xl:min-w-[185px] 5xl:max-w-[195px] 5xl:min-w-[195px] 6xl:max-w-[220px] 6xl:min-w-[220px]",loading:"lazy",alt:"Compny Logo"})})]})||"/dealer/reset-password"==t&&(0,M.jsxs)(Ae.N_,{to:e("routes.Home","/"),className:"flex gap-2 items-center text-2xl ",children:[(0,M.jsx)("p",{className:"text-black  dark:text-main-heading-white italic font-medium text-sm md:text-base 2xl:text-lg 3xl:text-xl 4xl:text-[22px] 5xl:text-2xl 6xl:text-[29px]",children:e("powered by")}),(0,M.jsx)("div",{className:"text-black",children:(0,M.jsx)("img",{src:"https://res.cloudinary.com/dr3ie9gpz/image/upload/v1739364950/bxqpgiqdq33cvtq1wwbo.webp",className:"max-h-[39px] min-h-[39px] xxxsm:max-w-[115px] xxxsm:min-w-[115px] xsm:max-w-[120px] xsm:min-w-[120px] sm:max-w-[125px] sm:min-w-[125px] xl:max-w-[135px] xl:min-w-[135px] 2xl:max-h-[43px] 2xl:min-h-[43px] 3xl:max-h-[46px] 3xl:min-h-[46px] 4xl:max-h-[50px] 4xl:min-h-[50px] 5xl:max-h-[55px] 5xl:min-h-[55px] 6xl:max-h-[62px] 6xl:min-h-[62px] 2xl:max-w-[150px] 2xl:min-w-[150px] 3xl:max-w-[185px] 3xl:min-w-[185px] 5xl:max-w-[195px] 5xl:min-w-[195px] 6xl:max-w-[220px] 6xl:min-w-[220px]",loading:"lazy",alt:"Compny Logo"})})]})||"/ar/dealer/reset-password"==t&&(0,M.jsxs)(Ae.N_,{to:e("routes.Home","/"),className:"flex gap-2 items-center text-2xl ",children:[(0,M.jsx)("p",{className:"text-black dark:text-main-heading-white italic font-medium text-sm md:text-base 2xl:text-lg 3xl:text-xl 4xl:text-[22px] 5xl:text-2xl 6xl:text-[29px]",children:e("powered by")}),(0,M.jsx)("div",{className:"text-black",children:(0,M.jsx)("img",{src:"https://res.cloudinary.com/dr3ie9gpz/image/upload/v1739364950/bxqpgiqdq33cvtq1wwbo.webp",className:"max-h-[39px] min-h-[39px] xxxsm:max-w-[115px] xxxsm:min-w-[115px] xsm:max-w-[120px] xsm:min-w-[120px] sm:max-w-[125px] sm:min-w-[125px] xl:max-w-[135px] xl:min-w-[135px] 2xl:max-h-[43px] 2xl:min-h-[43px] 3xl:max-h-[46px] 3xl:min-h-[46px] 4xl:max-h-[50px] 4xl:min-h-[50px] 5xl:max-h-[55px] 5xl:min-h-[55px] 6xl:max-h-[62px] 6xl:min-h-[62px] 2xl:max-w-[150px] 2xl:min-w-[150px] 3xl:max-w-[185px] 3xl:min-w-[185px] 5xl:max-w-[195px] 5xl:min-w-[195px] 6xl:max-w-[220px] 6xl:min-w-[220px]",loading:"lazy",alt:"Compny Logo"})})]})||"/ar/dealer/addcar"==t&&(0,M.jsxs)(Ae.N_,{to:e("routes.Home","/"),className:"flex gap-2 items-center text-2xl ",children:[(0,M.jsx)("p",{className:"text-black dark:text-main-heading-white italic font-medium text-sm md:text-base 2xl:text-lg 3xl:text-xl 4xl:text-[22px] 5xl:text-2xl 6xl:text-[29px]",children:e("powered by")}),(0,M.jsx)("div",{className:"text-black",children:(0,M.jsx)("img",{src:"https://res.cloudinary.com/dr3ie9gpz/image/upload/v1739364950/bxqpgiqdq33cvtq1wwbo.webp",className:"max-h-[39px] min-h-[39px] xxxsm:max-w-[115px] xxxsm:min-w-[115px] xsm:max-w-[120px] xsm:min-w-[120px] sm:max-w-[125px] sm:min-w-[125px] xl:max-w-[135px] xl:min-w-[135px] 2xl:max-h-[43px] 2xl:min-h-[43px] 3xl:max-h-[46px] 3xl:min-h-[46px] 4xl:max-h-[50px] 4xl
1:min-h-[50px] 5xl:max-h-[55px] 5xl:min-h-[55px] 6xl:max-h-[62px] 6xl:min-h-[62px] 2xl:max-w-[150px] 2xl:min-w-[150px] 3xl:max-w-[185px] 3xl:min-w-[185px] 5xl:max-w-[195px] 5xl:min-w-[195px] 6xl:max-w-[220px] 6xl:min-w-[220px]",loading:"lazy",alt:"Compny Logo"})})]})||"/dealer/carbidding"==t&&(0,M.jsxs)(Ae.N_,{to:e("routes.Home","/"),className:"flex gap-2 items-center text-2xl ",children:[(0,M.jsx)("p",{className:"text-black dark:text-main-heading-white italic font-medium text-sm md:text-base 2xl:text-lg 3xl:text-xl 4xl:text-[22px] 5xl:text-2xl 6xl:text-[29px]",children:e("powered by")}),(0,M.jsx)("div",{className:"text-black",children:(0,M.jsx)("img",{src:"https://res.cloudinary.com/dr3ie9gpz/image/upload/v1739364950/bxqpgiqdq33cvtq1wwbo.webp",className:"max-h-[39px] min-h-[39px] xxxsm:max-w-[115px] xxxsm:min-w-[115px] xsm:max-w-[120px] xsm:min-w-[120px] sm:max-w-[125px] sm:min-w-[125px] xl:max-w-[135px] xl:min-w-[135px]  2xl:max-h-[43px] 2xl:min-h-[43px] 3xl:max-h-[46px] 3xl:min-h-[46px] 4xl:max-h-[50px] 4xl:min-h-[50px] 5xl:max-h-[55px] 5xl:min-h-[55px] 6xl:max-h-[62px] 6xl:min-h-[62px] 2xl:max-w-[150px] 2xl:min-w-[150px] 3xl:max-w-[185px] 3xl:min-w-[185px] 5xl:max-w-[195px] 5xl:min-w-[195px] 6xl:max-w-[220px] 6xl:min-w-[220px]",loading:"lazy",alt:"Compny Logo"})})]})||"/ar/dealer/carbidding"==t&&(0,M.jsxs)(Ae.N_,{to:e("routes.Home","/"),className:"flex gap-2 items-center text-2xl ",children:[(0,M.jsx)("p",{className:"text-black dark:text-main-heading-white italic font-medium text-sm md:text-base 2xl:text-lg 3xl:text-xl 4xl:text-[22px] 5xl:text-2xl 6xl:text-[29px]",children:e("powered by")}),(0,M.jsx)("div",{className:"text-black",children:(0,M.jsx)("img",{src:"https://res.cloudinary.com/dr3ie9gpz/image/upload/v1739364950/bxqpgiqdq33cvtq1wwbo.webp",className:"max-h-[39px] min-h-[39px] xxxsm:max-w-[115px] xxxsm:min-w-[115px] xsm:max-w-[120px] xsm:min-w-[120px] sm:max-w-[125px] sm:min-w-[125px] xl:max-w-[135px] xl:min-w-[135px] 2xl:max-h-[43px] 2xl:min-h-[43px] 3xl:max-h-[46px] 3xl:min-h-[46px] 4xl:max-h-[50px] 4xl:min-h-[50px] 5xl:max-h-[55px] 5xl:min-h-[55px] 6xl:max-h-[62px] 6xl:min-h-[62px] 2xl:max-w-[150px] 2xl:min-w-[150px] 3xl:max-w-[185px] 3xl:min-w-[185px] 5xl:max-w-[195px] 5xl:min-w-[195px] 6xl:max-w-[220px] 6xl:min-w-[220px]",loading:"lazy",alt:"Compny Logo"})})]})||"/dealer/carbidding/search"==t&&(0,M.jsxs)(Ae.N_,{to:e("routes.Home","/"),className:"flex gap-2 items-center text-2xl ",children:[(0,M.jsx)("p",{className:"text-black dark:text-main-heading-white italic font-medium text-sm md:text-base 2xl:text-lg 3xl:text-xl 4xl:text-[22px] 5xl:text-2xl 6xl:text-[29px]",children:e("powered by")}),(0,M.jsx)("div",{className:"text-black",children:(0,M.jsx)("img",{src:"https://res.cloudinary.com/dr3ie9gpz/image/upload/v1739364950/bxqpgiqdq33cvtq1wwbo.webp",className:"max-h-[39px] min-h-[39px] xxxsm:max-w-[115px] xxxsm:min-w-[115px] xsm:max-w-[120px] xsm:min-w-[120px] sm:max-w-[125px] sm:min-w-[125px] xl:max-w-[135px] xl:min-w-[135px] 2xl:max-h-[43px] 2xl:min-h-[43px] 3xl:max-h-[46px] 3xl:min-h-[46px] 4xl:max-h-[50px] 4xl:min-h-[50px] 5xl:max-h-[55px] 5xl:min-h-[55px] 6xl:max-h-[62px] 6xl:min-h-[62px] 2xl:max-w-[150px] 2xl:min-w-[150px] 3xl:max-w-[185px] 3xl:min-w-[185px] 5xl:max-w-[195px] 5xl:min-w-[195px] 6xl:max-w-[220px] 6xl:min-w-[220px]",loading:"lazy",alt:"Compny Logo"})})]})||t.startsWith("/dealer/carbidding/")&&(0,M.jsxs)(Ae.N_,{to:e("routes.Home","/"),className:"flex gap-2 items-center text-2xl ",children:[(0,M.jsx)("p",{className:"text-black dark:text-main-heading-white italic font-medium text-sm md:text-base 2xl:text-lg 3xl:text-xl 4xl:text-[22px] 5xl:text-2xl 6xl:text-[29px]",children:e("powered by")}),(0,M.jsx)("div",{className:"text-black",children:(0,M.jsx)("img",{src:"https://res.cloudinary.com/dr3ie9gpz/image/upload/v1739364950/bxqpgiqdq33cvtq1wwbo.webp",className:"max-h-[39px] min-h-[39px] xxxsm:max-w-[115px] xxxsm:min-w-[115px] xsm:max-w-[120px] xsm:min-w-[120px] sm:max-w-[125px] sm:min-w-[125px] xl:max-w-[135px] xl:min-w-[135px] 2xl:max-h-[43px] 2xl:min-h-[43px] 3xl:max-h-[46px] 3xl:min-h-[46px] 4xl:max-h-[50px] 4xl
1:min-h-[50px] 5xl:max-h-[55px] 5xl:min-h-[55px] 6xl:max-h-[62px] 6xl:min-h-[62px] 2xl:max-w-[150px] 2xl:min-w-[150px] 3xl:max-w-[185px] 3xl:min-w-[185px] 5xl:max-w-[195px] 5xl:min-w-[195px] 6xl:max-w-[220px] 6xl:min-w-[220px]",loading:"lazy",alt:"Compny Logo"})})]})||t.startsWith("/ar/dealer/carbidding/")&&(0,M.jsxs)(Ae.N_,{to:e("routes.Home","/"),className:"flex gap-2 items-center text-2xl ",children:[(0,M.jsx)("p",{className:"text-black dark:text-main-heading-white italic font-medium text-sm md:text-base 2xl:text-lg 3xl:text-xl 4xl:text-[22px] 5xl:text-2xl 6xl:text-[29px]",children:e("powered by")}),(0,M.jsx)("div",{className:"text-black",children:(0,M.jsx)("img",{src:"https://res.cloudinary.com/dr3ie9gpz/image/upload/v1739364950/bxqpgiqdq33cvtq1wwbo.webp",className:"max-h-[39px] min-h-[39px] xxxsm:max-w-[115px] xxxsm:min-w-[115px] xsm:max-w-[120px] xsm:min-w-[120px] sm:max-w-[125px] sm:min-w-[125px] xl:max-w-[135px] xl:min-w-[135px] 2xl:max-h-[43px] 2xl:min-h-[43px] 3xl:max-h-[46px] 3xl:min-h-[46px] 4xl:max-h-[50px] 4xl:min-h-[50px] 5xl:max-h-[55px] 5xl:min-h-[55px] 6xl:max-h-[62px] 6xl:min-h-[62px] 2xl:max-w-[150px] 2xl:min-w-[150px] 3xl:max-w-[185px] 3xl:min-w-[185px] 5xl:max-w-[195px] 5xl:min-w-[195px] 6xl:max-w-[220px] 6xl:min-w-[220px]",loading:"lazy",alt:"Compny Logo"})})]})||t.startsWith("/dealer/edit-car/")&&(0,M.jsxs)(Ae.N_,{to:e("routes.Home","/"),className:"flex gap-2 items-center text-2xl ",children:[(0,M.jsx)("p",{className:"text-black dark:text-main-heading-white italic font-medium text-sm md:text-base 2xl:text-lg 3xl:text-xl 4xl:text-[22px] 5xl:text-2xl 6xl:text-[29px]",children:e("powered by")}),(0,M.jsx)("div",{className:"text-black",children:(0,M.jsx)("img",{src:"https://res.cloudinary.com/dr3ie9gpz/image/upload/v1739364950/bxqpgiqdq33cvtq1wwbo.webp",className:"max-h-[39px] min-h-[39px] xxxsm:max-w-[115px] xxxsm:min-w-[115px] xsm:max-w-[120px] xsm:min-w-[120px] sm:max-w-[125px] sm:min-w-[125px] xl:max-w-[135px] xl:min-w-[135px] 2xl:max-h-[43px] 2xl:min-h-[43px] 3xl:max-h-[46px] 3xl:min-h-[46px] 4xl:max-h-[50px] 4xl:min-h-[50px] 5xl:max-h-[55px] 5xl:min-h-[55px] 6xl:max-h-[62px] 6xl:min-h-[62px] 2xl:max-w-[150px] 2xl:min-w-[150px] 3xl:max-w-[185px] 3xl:min-w-[185px] 5xl:max-w-[195px] 5xl:min-w-[195px] 6xl:max-w-[220px] 6xl:min-w-[220px]",loading:"lazy",alt:"Compny Logo"})})]})||t.startsWith("/ar/dealer/edit-car/")&&(0,M.jsxs)(Ae.N_,{to:e("routes.Home","/"),className:"flex gap-2 items-center text-2xl ",children:[(0,M.jsx)("p",{className:"text-black dark:text-main-heading-white italic font-medium text-sm md:text-base 2xl:text-lg 3xl:text-xl 4xl:text-[22px] 5xl:text-2xl 6xl:text-[29px]",children:e("powered by")}),(0,M.jsx)("div",{className:"text-black",children:(0,M.jsx)("img",{src:"https://res.cloudinary.com/dr3ie9gpz/image/upload/v1739364950/bxqpgiqdq33cvtq1wwbo.webp",className:"max-h-[39px] min-h-[39px] xxxsm:max-w-[115px] xxxsm:min-w-[115px] xsm:max-w-[120px] xsm:min-w-[120px] sm:max-w-[125px] sm:min-w-[125px] xl:max-w-[135px] xl:min-w-[135px] 2xl:max-h-[43px] 2xl:min-h-[43px] 3xl:max-h-[46px] 3xl:min-h-[46px] 4xl:max-h-[50px] 4xl:min-h-[50px] 5xl:max-h-[55px] 5xl:min-h-[55px] 6xl:max-h-[62px] 6xl:min-h-[62px] 2xl:max-w-[150px] 2xl:min-w-[150px] 3xl:max-w-[185px] 3xl:min-w-[185px] 5xl:max-w-[195px] 5xl:min-w-[195px] 6xl:max-w-[220px] 6xl:min-w-[220px]",loading:"lazy",alt:"Compny Logo"})})]}),(0,M.jsx)("div",{})]})})};var Be=x(49804),ze=x(78752),Fe=x(3825);const Ee=()=>{const{t:e,i18n:t}=(0,p.Bd)(),x=[{title:{ar:"\u0625\u062f\u0627\u0631\u0629 \u0627\u0644\u0633\u064a\u0627\u0631\u0627\u062a",en:"Manage Cars"},icon:{ar:(0,M.jsx)(Be.T9A,{className:"2xl:translate-y-[-3px] 3xl:translate-y-[-1px]"}),en:(0,M.jsx)(Be.T9A,{className:"2xl:translate-y-[-3px] 3xl:translate-y-[-1px]"})},href:{ar:"/ar/dealer/dashboard",en:"/dealer/dashboard"}},{title:{ar:"\u0623\u0636\u0641 \u0633\u064a\u0627\u0631\u0629",en:"Add Car"},icon:{ar:(0,M.jsx)(a.Y4E,{className:"2xl:translate-y-[-3px] 3xl:translate-y-[-1px] "}),en:(0,M.jsx)(a.Y4E,{className:"2xl:translate-y-[-3px] 3xl:translate-y-[-1px]"})},href:{ar:"/ar/dealer/addcar",en:"/dealer/addcar"}},{title:{ar:"\u0645\u0632\u0627\u064a\u062f\u0629 \u0627\u0644\u0633\u064a\u0627\u0631\u0627\u062a",en:"Car Bidding"},icon:{ar:(0,M.jsx)(Ce.bMy,{}),en:(0,M.jsx)(Ce.bMy,{})},href:{ar:"/ar/dealer/carbidding",en:"/dealer/carbidding"}},{title:{ar:"\u0639\u0645\u0644\u064a\u0629",en:"Transaction"},icon:{ar:(0,M.jsx)(ge.sNT,{}),en:(0,M.jsx)(ge.sNT,{})},href:{ar:"ar/dealer/carbidding/search",en:"/dealer/carbidding/search"}},{title:{ar:"\u062a\u062d\u0644\u064a\u0644\u0627\u062a",en:"Analytics"},icon:{ar:(0,M.jsx)(Ce.bMy,{}),en:(0,M.jsx)(Ce.bMy,{})},href:{ar:"#",en:"#"}},{title:{ar:"\u062d\u0633\u0627\u0628 \u062a\u0639\u0631\u064a\u064
11\u064a",en:"Profile"},icon:{ar:(0,M.jsx)(a.NBi,{className:"2xl:translate-y-[-3px] 3xl:translate-y-[-1px]"}),en:(0,M.jsx)(a.NBi,{className:"2xl:translate-y-[-3px] 3xl:translate-y-[-1px]"})},href:{ar:"/ar/dealer/profile",en:"/dealer/profile"}},{title:{ar:"\u0625\u0639\u062f\u0627\u062f\u0627\u062a",en:"Logout"},icon:{ar:(0,M.jsx)(Ce.dRg,{className:"2xl:translate-y-[-2px] 3xl:translate-y-[-1px]"}),en:(0,M.jsx)(Ce.dRg,{className:"2xl:translate-y-[-2px] 3xl:translate-y-[-1px]"})},href:{ar:"/",en:"/"}}],s=(0,u.zy)(),r=(0,i.wA)(),o=(0,u.Zp)(),c=s.pathname,[m,h]=(0,l.useState)(!1),[g,f]=(0,l.useState)(!1),[v,b]=(0,l.useState)(!1);(0,l.useEffect)((()=>{const e=()=>{window.innerWidth<=768?(f(!1),b(!1)):window.innerWidth<=1024?(f(!0),b(!0)):(f(!1),b(!1))};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]);const w=(0,i.d4)((e=>e.auth.turno)),[y,j]=(0,l.useState)("");return(0,l.useEffect)((()=>{const e=localStorage.getItem("automotors__UserData");if(e){const t=(0,d.s)(e);j(t.image)}}),[w]),(0,l.useEffect)((()=>{const e=document.createElement("style");return e.innerHTML="\n    @keyframes shine {\n      0% { background-position: 200%; }\n      50% { background-position: 50%; }\n      100% { background-position: -200%; }\n    }\n  ",document.head.appendChild(e),()=>{document.head.removeChild(e)}}),[]),(0,M.jsx)(M.Fragment,{children:(0,M.jsxs)(M.Fragment,{children:[m?(0,M.jsx)("button",{onClick:()=>h(!m),className:"fixed top-4 xxxsm:left-[260px] xsm:left-[315px] z-[200] text-[24px] p-[2px] md:hidden bg-white text-gray-500 dark:bg-cl-dashbord-button dark:text-main-heading-white dark:border dark:border-border-color  rounded-md hover:text-blue-600",children:(0,M.jsx)(Fe.zhF,{})}):(0,M.jsx)("button",{onClick:()=>h(!m),className:"fixed top-4 left-[20px] z-[200] text-[25px] md:hidden dark:text-main-heading-white   ",children:(0,M.jsx)(n.FcN,{})}),(0,M.jsxs)("div",{className:" fixed md:stick z-[150] top-0 left-0 h-screen bg-white dark:bg-dark-from p-4 transform transition-transform duration-300 ".concat(m?"translate-x-0":"-translate-x-full"," md:sticky md:translate-x-0 ").concat(g?"w-[80px] 2xl:w-[120px] 3xl:w-[130px] 5xl:w-[160px] 6xl:w-[180px]":"xxxsm:w-[250px] xsm:w-[300px] 2xl:w-[360
1px] 3xl:w-[400px] 4xl:w-[470px] 5xl:w-[520px] 6xl:w-[570px]"," overflow-y-auto  "),children:[(0,M.jsx)("div",{className:"flex items-center justify-center",children:g?(0,M.jsx)("div",{className:" w-[160px] h-[40px] 2xl:w-[180px] 2xl:h-[60px] 3xl:w-[210px] 3xl:h-[80px] 4xl:w-[220px] 4xl:h-[90px] 5xl:w-[250px] 5xl:h-[120px] 6xl:w-[270px] 6xl:h-[130px] ",children:(0,M.jsx)("img",{src:"".concat(y),alt:"logo",loading:"lazy",className:"w-full h-full bg-cover bg-white dark:bg-dark-from",style:{background:"white",maskImage:"none",WebkitMaskImage:"none"}})}):(0,M.jsx)("div",{className:" w-[150px] h-[100px] 2xl:w-[170px] 3xl:w-[190px] 4xl:w-[220px] 4xl:h-[120px] 5xl:w-[220px] 5xl:h-[140px] 6xl:w-[290px] 6xl:h-[160px]  ",children:(0,M.jsx)("img",{src:"".concat(y),loading:"lazy",alt:"logo",className:"w-full h-full object-cover bg-white dark:bg-dark-from",style:{background:"white",maskImage:"none",WebkitMaskImage:"none"}})})}),(0,M.jsx)("ul",{className:"space-y-4 4xl:space-y-[18px] 5xl:space-y-5 6xl:space-y-[22px] mt-6",children:x.map((x=>(0,M.jsxs)("div",{className:"relative",children:[("Transaction"===x.title.en||"Analytics"===x.title.en)&&(0,M.jsx)("span",{className:"bg-[#51DE80] top-0  ".concat("ar"===t.language?"left-0 rounded-tl-lg":"right-0 rounded-tr-lg"),style:{background:"linear-gradient(\n                  90deg,\n                  rgba(255, 255, 255, 0.1) 0%,\n                  rgba(255, 255, 255, 0.6) 50%,\n                  rgba(255, 255, 255, 0.1) 100%\n                )",backgroundSize:"200% auto",animation:"shine 4s linear infinite",color:"white",padding:"5px 10px",fontSize:"10px",position:"absolute",zIndex:10,boxShadow:"0 0 8px rgba(255, 255, 255, 0.4)",backgroundColor:"#51DE80"},children:e("coming soon")}),(0,M.jsxs)(Ae.N_,{onClick:e=>{"Transaction"!==x.title.en&&"Analytics"!==x.title.en?((e=>{"Logout"!==e.title.en&&"\u0625\u0639\u062f\u0627\u062f\u0627\u062a"!==e.title.ar||(r((0,ze.vq)({})),localStorage.removeItem("automotors__UserData"),o(e.href[window.langName])),"Manage Cars"!==e.title.en&&"\u0625\u0639\u062f\u0627\u062f\u0627\u062a"!==e.title.ar||o(e.href[window.langName]),"Profile"!==e.title.en&&"\u0625\u0639\u062f\u0627\u062f\u0627\u062a"!==e.title.ar||o(e.href[window.langName]),"Add Car"!==e.title.en&&"\u0625\u0639\u062f\u0627\u062f\u0627\u062a"!==e.title.ar||o(e.href[window.langName]),"Car Bidding"!==e.title.en&&"\u0625\u0639\u062f\u0627\u062f\u0627\u062a"!==e.title.ar||o(e.href[window.langName]),"Transaction "!==e.title.en&&"\u0639\u0645\u0644\u064a\u0629"!==e.title.ar||o(e.href[window.langName])})(x),window.innerWidth>=340&&window.innerWidth<=768&&h(!1)):e.preventDefault()},to:x.href[window.langName],className:"flex gap-2 items-center ".concat(c===x.href[window.langName]?"bg-[#0473E9] text-white":"bg-gray-200 text-[#4D5059] dark:bg-cl-dashbord-button dark:text-main-heading-white"," p-3 2xl:p-4 4xl:p-5 5xl:p-6 rounded-lg cursor-pointer ").concat("Transaction"===x.title.en||"Analytics"===x.title.en?"opacity-50 cursor-not-allowed ":"hover:bg-[#0473E9] hover:text-white "," ").concat(g?"justify-center":""),children:[(0,M.jsx)("div",{className:"text-[20px] 2xl:text-[24px] 3xl:text-[26px] 4xl:text-[28px] 5xl:text-[31px] 6xl:text-[35px]",children:x.icon[window.langName]}),g||(0,M.jsx)("p",{className:"text-[16px] 2xl:text-lg 3xl:text-xl 4xl:text-[22px] 5xl:text-2xl 6xl:text-[27px]",children:x.title[window.langName]})]},x.title[window.langName])]},x.title[window.langName])))})]}),m&&(0,M.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 z-[100] md:hidden",onClick:()=>h(!1)}),!v&&(g?(0,M.jsx)("button",{onClick:()=>f(!g),className:"".concat(window.isArabic?"right-[60px] 2xl:right-[95px] 3xl:right-[100px] 5xl:right-[130px] 6xl:right-[140px]":"left-[60px] 2xl:left-[95px] 3xl:left-[100px] 5xl:left-[130px] 6xl:left-[140px]"," text-center fixed top-[80px]  z-[200] hidden md:block bg-white dark:bg-dark-from dark:border-border-color dark:text-main-heading-white p-1 rounded-lg border border-[#e6e6e6] hover:text-blue-600 text-gray-700"),children:(0,M.jsx)(n.LG8,{className:"text-xl 2xl:text-[22px] 3xl:text-2xl 4xl:text-[26px] 5xl:text-[29px] 6xl:text-[35px]"})}):(0,M.jsx)("button",{onClick:()=>f(!g),className:"".concat(window.isArabic?"right-[232px] 2xl:right-[285px] 3xl:right-[315p
1x] 4xl:right-[370px] 5xl:right-[410px] 6xl:right-[450px]":"left-[232px] 2xl:left-[285px] 3xl:left-[315px] 4xl:left-[370px] 5xl:left-[410px] 6xl:left-[450px]"," fixed top-[80px]  z-[200] hidden md:block bg-white dark:bg-dark-from dark:border-border-color dark:text-main-heading-white p-1 rounded-lg border border-[#e6e6e6] hover:text-blue-700 text-gray-700"),children:(0,M.jsx)(n.LG8,{className:"text-xl 2xl:text-[22px] 3xl:text-2xl 4xl:text-[26px] 5xl:text-[29px] 6xl:text-[35px]"})}))]})})};x(33548);var Me=x(41985),Ie=x(23216),Le=x(89698),Te=x(31462),Pe=x(88877),Re=x(15977);const qe=()=>{var e,t;const x=localStorage.getItem("automotors__UserData"),{t:i,i18n:o}=(0,p.Bd)(),[h,g]=(0,l.useState)({}),[f,v]=(0,l.useState)({vehicleid:null,value:null,editMode:!1}),[b,w]=(0,l.useState)([]),[y]=(0,Ae.ok)(),j=y.get("page"),N=parseInt(j,10)||1,k=25,[C,D]=(0,l.useState)("updated:recent-first"),[A,S]=(0,l.useState)(!1);(0,l.useEffect)((()=>{(async()=>{me||S(!0);try{const e=await s.A.post("".concat("https://www.arabiawheel.com/automotor","/api/vehicles/filter?page=").concat(N?N-1:0,"&size=").concat(k),{status:!0,pendingBidStatus:!1,vehicleCategory:"used-car",sortBy:C,userType:"user"},{headers:{"Content-Type":"application/json"}});e.data&&w(e.data)}catch(e){console.error("error:",e)}finally{me||S(!1)}})()}),[C,N]),(0,l.useEffect)((()=>{(async()=>{try{const e=localStorage.getItem("automotors__UserData");if(e){const t=(0,d.s)(e).id,x=await s.A.get("".concat("https://www.arabiawheel.com/automotor","/bids/userbids/").concat(t));if(x.data){const e={};x.data.forEach((t=>{e[t.vehicleId]=t.biddingPrice})),g(e)}}}catch(e){console.error("E:",e)}})()}),[]);const B=async e=>{if(f.value)try{const t=localStorage.getItem("automotors__UserData");if(t){const l=(0,d.s)(t).id;if(void 0!==h[e]){200===(await s.A.put("".concat("https://www.arabiawheel.com/automotor","/bids/updateBids/").concat(e),{biddingprice:f.value},{headers:{Authorization:"Bearer ".concat(x)}})).status&&r.oR.success("Bid updated successfully!")}else{200===(await s.A.post("".concat("https://www.arabiawheel.com/automotor","/bids/placeBid"),{user:{id:l},vehicle:{id:e},biddingprice:f.value},{headers:{Authorization:"Bearer ".concat(x)}})).status&&r.oR.success("Bid placed successfully!")}g((t=>({...t,[e]:f.value}))),v({vehicleid:null,value:null,editMode:!1})}}catch(t){console.error("Error placing or updating bid:",t),alert("Failed to place or update bid. Please try again.")}else r.oR.info("please enter value for bidding")},z=(0,u.zy)(),F=(0,u.Zp)(),[E,I]=(0,l.useState)(!0),[L,T]=(0,l.useState)(!0),[P,R]=(0,l.useState)(!0),[q,V]=(0,l.useState)(!0),[_,O]=(0,l.useState)(!1),[H,W]=(0,l.useState)(!1),[U,Y]=(0,l.useState)(!1),[K,G]=(0,l.useState)(!1),[$,J]=(0,l.useState)(!1),[X,Z]=(0,l.useState)(!1),[Q,ee]=(0,l.useState)(!1),[te,xe]=(0,l.useState)(!1),{ctCheckbox:le}={ctCheckbox:z.pathname.split("/").filter((e=>e.startsWith("ct_")))},[ae,se]=(0,l.useState)([b]),[re,ie]=(0,l.useState)([...le]);(0,l.useEffect)((()=>{const e=null===le||void 0===le?void 0:le.map((e=>e.split("_")[1].toLowerCase()));let t=b;e.length>0&&(t=b.filter((t=>e.includes(t.location.toLowerCase())))),se(t)}),[le]),(0,l.useEffect)((()=>{ie([...le])}),[z.pathname]);const[de,ne]=(0,l.useState)(""),[oe,pe]=(0,l.useState)(0),[me,ue]=(0,l.useState)(!1),[he,fe]=(0,l.useState)(43);(0,l.useEffect)((()=>{let e=ae.length,t=(Math.ceil(e/k),k*N-1);pe(k*N-k),fe(t),fe(t>e?e-1:t)}),[N,ae.length]);const[ve,be]=(0,l.useState)(1),[we,ye]=(0,l.useState)(!1),[je,Ne]=(0,l.useState)("list"),[ke,De]=(0,l.useState)(!0),[Se,ze]=(0,l.useState)(!1);return(0,M.jsxs)("div",{dir:window.directionTo,className:"",children:[(0,M.jsxs)(m.mg,{children:[(0,M.jsx)("title",{children:i("dealerBiddingListingTitle")}),(0,M.jsx)("meta",{name:"description",content:i("dealerBiddingListingDescription")}),(0,M.jsx)("meta",{name:"keywords",content:i("dealerBiddingListingKeywords")}),(0,M.jsx)("meta",{name:"robots",content:"index, follow"}),(0,M.jsx)("meta",{name:"author",content:"Arabiawheel Team"}),(0,M.jsx)("meta",{name:"publisher",content:"Arabiawheel"}),(0,M.jsx)("link",{rel:"canonical",href:"http://localhost:3000/"}),(0,M.jsx)("meta",{name:"lang",content:o.language})]}),(0,M.jsxs)("div",{className:"xxxsm:w-full md:w-[97%] mx-auto mt-3 flex flex-col gap-3",children:[(0,M.jsxs)("div",{className:"  justify-between hidden",children:[(0,M.jsx)("h2",{}),(0,M.jsx)("div",{children:(0,M.jsxs)(Ae.N_,{to:"search",className:"w-[100%]  sm:m-auto border border-black hover:border-[#0473E9] bg-transparent sm:bg-[#F2F3F3] hover:bg-[#0473E9] hover:text-white duration-300 text-black rounded  py-1 px-2 flex items-center justify-center gap-[6px]",children:[(0,M.jsx)("span",{className:"text-xs sm:text-sm font-sans",children:i("advanced filter")})," "]})})]}),(0,M.jsx)("div",{className:"",children:(0,M.jsxs)("div",{className:" min-h-[calc(100vh-70px)] w-full flex flex-col mb-5",children:[(0,M.jsx)("div",{className:"bg-white dark:bg-dark-from w-[100%] mb-4 border border-[#e6e6e6] dark:border-light-border  xxxsm:hidden md:block shadow-md",children:(0,M.jsxs)("div",{className:"w-[96%] p-4 2xl:p-[18px] 4xl:p-[20px] 5xl:p-[23px] 6xl:p-[25px] flex justify-between mx-auto",children:[(0,M.jsxs)("div",{className:"flex items-center gap-1",children:[(0,M.jsxs)("span",{className:"text-xs 2xl:text-[13px] 3xl:text-sm 4xl:text-base 5xl:text-lg 6xl:text-xl text-[#7b8397]",children:[i("sort by"),":"]}),(0,M.jsx)("form",{className:"max-w-sm  mx-auto",children:(0,M.jsxs)("select",{onChange:e=>{const t=e.target.value,x=new URLSearchParams(z.search);x.delete("page"),D(t),F("".concat(z.pathname,"?").concat(x.toString()),{replace:!0})},id:"countries",className:"bg-gray-50 dark:bg-vehicle-bg dark:text-main-heading-white min-w-52 border  shadow-slate-300 border-gray-400 outline-none text-[#434343] text-xs 3xl:text-[13px] 4xl:text-sm 5xl:text-base 6xl:text-lg 7xl:text-xl   block p-[2px] 2xl:p-1 4xl:p-[6px] 5xl:p-[7px] 6xl:p-[8px] font-bold rounded-sm",children:[(0,M.jsx)("option",{selected:"updated:recent-first"===(null===C||void 0===C?void 0:C.sortBy)||!(null!==C&&void 0!==C&&C.sortBy),name:"recentFirst",value:"updated:recent-first",children:i("Updated Date: Recent First")}),(0,M.jsx)("option",{selected:"updated:oldest-first"==(null===C||void 0===C?void 0:C.sortBy),name:"oldestFirst",value:"updated:oldest-first",children:i("Updated Date: Oldest First")}),(0,M.jsx)("option",{selected:"price:low-to-high"==(null===C||void 0===C?void 0:C.sortBy),name:"priceLowToHigh",value:"price:low-to-high",children:i("Price: Low to High")}),(0,M.jsx)("option",{selected:"price:high-to-low"==(null===C||void 0===C?void 0:C.sortBy),name:"priceHighToLow",value:"price:high-to-low",children:i("Price: High to Low")}),(0,M.jsx)("option",{selected:"model-year:latest"==(null===C||void 0===C?void 0:C.sortBy),name:"modelLatest",value:"model-year:latest",children:i("Model Year: Latest First")}),(0,M.jsx)("option",{selected:"model-year:oldest"==(null===C||void 0===C?void 0:C.sortBy),name:"modelOldest",value:"model-year:oldest",children:i("Model Year: Oldest First")}),(0,M.jsx)("option",{selected:"mileage:high-to-low"==(null===C||void 0===C?void 0:C.sortBy),name:"mileageHigh",value:"mileage:low-to-high",children:i("Mileage: Low to High")}),(0,M.jsx)("option",{selected:"mileage:low-to-high"==(null===C||void 0===C?void 0:C.sortBy),name:"mileageLow",value:"mileage:high-to-low",children:i("Mileage: High to Low")})]})})]}),(0,M.jsxs)("div",{className:"flex",children:[(0,M.jsxs)("div",{onClick:()=>{Ne("list"),De(!0),ze(!1)},className:"".concat(ke&&"bg-[#0173E9] text-white "," border flex w-16 3xl:w-[68px] 4xl:w-[75px] 5xl:w-[74px] 6xl:w-[97px] items-center justify-center text-xs 2xl:text-sm 4xl:text-base 6xl:text-xl gap-[3px] p-1 2xl:p-[7px] 3xl:p-[9px] 4xl:p-[10px] 6xl:p-[13px]  shadow-inner text-[#434343] dark:text-gray-200  ").concat(window.isArabic?"rounded-r-md":"rounded-l-md","  cursor-pointer uppercase"),children:[(0,M.jsx)(a.v5n,{className:" ".concat(window.isArabic?"transform rotate-180":"transform rotate-0")})," ",i("list")]}),(0,M.jsxs)("div",{onClick:()=>{Ne("grid"),De(!1),ze(!0)},className:"".concat(Se&&"bg-[#0173E9] text-white"," border flex w-16 3xl:w-[68px] 4xl:w-[75px] 5xl:w-[74px] 6xl:w-[97px] items-center justify-center text-xs 2xl:text-sm 4xl:text-base 6xl:text-xl gap-[3px] p-1 2xl:p-[7px] 3xl:p-[9px] 4xl:p-[10px] 6xl:p-[13px]  shadow-inner text-[#434343] dark:text-gray-200 ").concat(window.isArabic?"rounded-l-md":"rounded-r-md","  cursor-pointer uppercase"),children:[(0,M.jsx)(Ce.fdS,{})," ",i("grid")]})]})]})}),(0,M.jsxs)("div",{className:"flex  justify-between mb-2 ",children:[(0,M.jsx)("h2",{}),(0,M.jsxs)("h2",{className:"text-[#7b8397] lato-bold tracking-wide text-sm 2xl:text-[15px] 4xl:text-base 5xl:text-lg  6xl:text-xl",children:["1 - ",(null===ae||void 0===ae?void 0:ae.totalPages)&&(null===ae||void 0===ae?void 0:ae.totalPages),"\xa0",i("of")," ",(null===ae||void 0===ae?void 0:ae.totalItems)&&(null===ae||void 0===ae?void 0:ae.totalItems)," ",i("results")]})]}),A?(0,M.jsx)("div",{className:"flex justify-center h-[80vh] items-center ",children:(0,M.jsx)("div",{className:"border-t-8 border-red-500 rounded-full h-12 w-12 animate-spin"})}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)("div",{className:"".concat("list"===je&&"flex flex-col gap-5 "," ").concat("grid"===je&&"grid md:grid-cols-2 xl:grid-cols-3  gap-
15","  "),children:null===ae||void 0===ae||null===(e=ae.content)||void 0===e?void 0:e.filter((e=>new Date(e.bidspan).getTime()>Date.now())).map(((e,t)=>{var x,l,s,r,d,p;return(0,M.jsxs)("div",{className:"".concat("list"===je&&" xxxsm:min-h-[170px] xxsm:min-h-[180px] xsm:min-h-[190px]  md:min-h-[195px] md:w-full xxxsm:w-[99%] xsm:w-[99%] sm:w-[98%] xxxsm:mx-auto xxxsm:rounded-lg md:rounded-none  "," ").concat("grid"===je&&"min-h-[380px] lg:min-h-[440px] xl:min-h-[450px] 2xl:min-h-[490px] 3xl:min-h-[515px] 4xl:min-h-[520px] 5xl:min-h-[530px] 6xl:min-h-[540px]","  grid place-items-center bg-[#fff] dark:bg-dark-from shadow-sm hover:shadow-lg transition-all duration-700 border-2 border-[#e6e6e6] dark:border-light-border "),children:[(0,M.jsxs)("div",{className:"".concat("list"===je&&"py-2  grid xxxsm:grid-cols-[4.8fr,6fr] xxxsm:gap-2 xxsm:grid-cols-[4fr,6fr] xsm:grid-cols-[3.1fr,6fr]   sm:grid-cols-[1.8fr,4fr] sm:gap-2  md:grid-cols-[1.9fr,5fr] lg:grid-cols-[1.6fr,5fr] md:gap-3 xl:grid-cols-[1.3fr,5fr] xl:gap-4 max-h-[95%] xxxsm:w-[97%] md:w-[97%]"," ").concat("grid"===je&&"grid grid-rows-[2fr,2.8fr]   max-h-[95%] w-[92%]"," "),children:[(0,M.jsx)("div",{className:"items-center flex justify-center bg-gray-600 ",children:(0,M.jsxs)("div",{className:"".concat("list"===je&&" xxxsm:h-[100px] xxsm:h-[110px] xsm:h-[130px] md:h-[140px] 2xl:h-[150px] 3xl:h-[170px] 4xl:h-[190px] 5xl:h-[210px] 6xl:h-[240px] "," ").concat("grid"===je&&" h-[150px] lg:h-[170px] xl:h-[180px] 2xl:h-[200px] 3xl:h-[210px] 4xl:h-[220px] 5xl:h-[240px] 6xl:h-[250px] "," bg-gray-600  relative  overflow-hidden items-center flex justify-center"),children:[(0,M.jsx)("img",{src:null!==e&&void 0!==e&&e.images[0]?null===e||void 0===e?void 0:e.images[0]:"https://res.cloudinary.com/dr3ie9gpz/image/upload/v1736513089/no-photo-available-icon-default-image-symbol-vector-40343347_jcz3bo.jpg",alt:"image not found",loading:"lazy",className:"".concat("list"===je&&"ml-auto"," ").concat("grid"===je&&"ml-auto")}),null!==e&&void 0!==e&&e.biddingVehicle?(0,M.jsxs)("div",{className:"bg-[#303030]  text-white opacity-85 px-3 py-[3px] xl:py-1 2xl:py-[6px] 3xl:py-2 4xl:px-[14px] 5xl:py-[10px] 6xl:py-3 absolute   bottom-0 flex gap-1 ".concat(window.isArabic?"right-0 ":"left-0"," "),children:[(0,M.jsx)(c.pIJ,{className:"text-[15px] xl:translate-y-[-2px] 2xl:text-[19px] 2xl:translate-y-[2px] 3xl:translate-y-[1px] 3xl:text-[20px] 4xl:text-[21px] 5xl:text-[24px] 6xl:text-[26px]"}),(0,M.jsx)("span",{className:"text-xs  xl:text-[13px] 2xl:text-base 3xl:text-base 4xl:text-lg 5xl:text-xl 6xl:text-[23px] font-bold ",children:null!==e&&void 0!==e&&e.bidspan?(0,M.jsx)(Re.A,{bidspan:null===e||void 0===e?void 0:e.bidspan}):"Loading..."})]}):(0,M.jsxs)("div",{className:"bg-neutral-700 text-white opacity-85 px-3 py-[2px] 2xl:py-[3px] 3xl:py-1 4xl:py-[6px] 4xl:px-[14px] absolute bottom-0 flex gap-1 ".concat(window.isArabic?"right-0":"left-0"),children:[(0,M.jsx)(a.vqJ,{className:"text-[15px] 2xl:text-[17px] 3xl:text-lg 4xl:text-xl"}),(0,M.jsx)("span",{className:"text-xs 2xl:text-[13px] 3xl:text-sm 4xl:text-base font-bold",children:null===e||void 0===e||null===(x=e.images)||void 0===x?void 0:x.length})]})]})}),(0,M.jsxs)("div",{className:"flex xxxsm:gap-1 sm:gap-1 md:gap-3 2xl:gap-4 3xl:gap-5 flex-col ".concat("list"===je&&"5xl:gap-6 6xl:gap-8","  "),children:[(0,M.jsxs)("div",{className:"".concat("list"===je&&"flex flex-col xxxsm:flex-col xxsm:flex-col sm:flex-col xxxsm:gap-1 xsm:gap-[2px] sm:gap-0  md:flex-row md:items-center md:justify-between"," ").concat("grid"===je&&"flex flex-col pt-2"," "),children:[(0,M.jsxs)(Ae.N_,{to:null!==e&&void 0!==e&&e.biddingVehicle?"".concat(i("routes.DealerBidding","/dealer/carbidding"),"/").concat(null===e||void 0===e?void 0:e.vehicleid):"".concat(i("routes.UsedCar","/used-car"),"/").concat(null===(l=e.makeName)||void 0===l?void 0:l.toLowerCase(),"/").concat(null===(s=e.modelName)||void 0===s?void 0:s.toLowerCase(),"/").concat(e.year,"/used-car-").concat(null===(r=e.makeName)||void 0===r?void 0:r.toLowerCase(),"-").concat(null===(d=e.modelName)||void 0===d?void 0:d.toLowerCase(),"-").concat(e.year,"-").concat(null===(p=e.cityName)||void 0===p?void 0:p.trim().toLowerCase().replace(/\s+/g,"-"),"-").concat(e.vehicleid),className:"no-underline  text-xs xsm:text-sm sm:text-sm md:text-base lg:text-lg 3xl:text-xl 4xl:text-[21px] 5xl:text-[22px] 6xl:text-[24px] text-[#233d7b] dark:text-[#C0CBF9] hover:text-[#39B3D7] dark:hover:text-[#18718A] font-semibold  ".concat("list"===je&&"whitespace-normal w-full md:w-[250px] lg:w-[350px] xl:w-[420px] 2xl:w-[450px] 3xl:w-[500px] 4xl
1:w-[530px] 5xl:w-[570px] 6xl:w-[600px] truncate overflow-hidden break-words "," ").concat("grid"===je&&"line-clamp-1 mt-1"),children:[" ",(0,M.jsxs)("abbr",{title:"".concat(null===e||void 0===e?void 0:e.makeName," ").concat(null===e||void 0===e?void 0:e.modelName," ").concat(null===e||void 0===e?void 0:e.carVersionName),className:"border-none no-underline",children:[i(null!==e&&void 0!==e&&e.makeName?"Make.".concat((null===e||void 0===e?void 0:e.makeName)||"default"):"loading")," ",i(e.modelName?"Model.".concat(e.modelName||"default"):"loading")," ",null===e||void 0===e?void 0:e.carVersionName]})]}),(0,M.jsx)("h1",{className:"".concat("list"===je&&" text-[#3eb549] dark:text-[#2E9442] font-bold xxxsm:text-sm xxsm:text-sm xsm:text-sm sm:text-sm   md:text-sm lg:text-base 3xl:text-lg 4xl:text-xl 5xl:text-2xl 6xl:text-[28px] "," ").concat("grid"===je&&"hidden"," "),children:null!==e&&void 0!==e&&e.price?(0,M.jsxs)(M.Fragment,{children:["BHD ",e.price.toLocaleString()]}):null!==e&&void 0!==e&&e.expectedbids?(0,M.jsxs)(M.Fragment,{children:[i("expected bid"),": BHD",e.expectedbids>=1e7?(e.expectedbids/1e7).toFixed(2):e.expectedbids>=1e5?(e.expectedbids/1e5).toFixed(2):e.expectedbids.toLocaleString("en-IN")]}):null})]}),(0,M.jsxs)("div",{className:"".concat("list"===je&&"gap-2 4xl:gap-3 "," ").concat("grid"===je&&"gap-1"," flex flex-col gap-1 "),children:[(0,M.jsx)("div",{className:"text-sm 2xl:text-base 3xl:text-lg 4xl:text-xl 5xl:text-[22px] 6xl:text-2xl 6xl:mb-2 text-[#434343] dark:text-gray-200 font-normal xxxsm:hidden md:block capitalize",children:i(e.city?"City.".concat(e.cityName||"default"):"loading")}),(0,M.jsxs)("div",{className:"md:hidden flex flex-col xxxsm:gap-1 xxsm:gap-2  xsm:gap-2 ",children:[(0,M.jsxs)("div",{className:"grid grid-cols-1 gap-1",children:[(0,M.jsxs)("div",{className:"flex items-center gap-1 xxxsm:text-[10px] xxsm:text-[12px] xsm:text-[13px] sm:text-sm font-normal",children:[(0,M.jsxs)("div",{className:"flex items-center gap-1 w-[100%] sm:w-[33%]",children:[(0,M.jsx)(ge.rG4,{className:"text-[#878787]"}),(0,M.jsx)("span",{className:"text-[#434343] dark:text-gray-200 truncate capitalize",children:i(e.city?"City.".concat(e.cityName||"default"):"loading")})]}),(0,M.jsxs)("div",{className:"md:hidden flex items-center gap-1 w-[100%] sm:w-[33%]",children:[(0,M.jsx)("span",{className:"w-[20%] flex justify-end",children:(0,M.jsx)(Le.$LK,{className:"text-[#878787]"})}),(0,M.jsx)("span",{className:"w-[80%] text-[#434343] dark:text-gray-200 truncate",children:null===e||void 0===e?void 0:e.year})]}),(0,M.jsxs)("div",{className:"flex items-center gap-1 w-[100%] sm:w-[33%] justify-end",children:[(0,M.jsx)(Ce.C_t,{className:"text-[#878787]"}),(0,M.jsx)("span",{className:"text-[#434343] dark:text-gray-200 truncate",children:null===e||void 0===e?void 0:e.mileage})]})]}),(0,M.jsxs)("div",{className:"flex items-center gap-1 xxxsm:text-[10px] xxsm:text-[12px] xsm:text-[13px] sm:text-sm font-normal",children:[(0,M.jsxs)("div",{className:"md:hidden flex items-center gap-1 w-[100%] sm:w-[33%]",children:[(0,M.jsx)(Te.sM,{className:"text-[#878787]"}),(0,M.jsx)("span",{className:"text-[#434343] dark:text-gray-200 truncate",children:i(null!==e&&void 0!==e&&e.fuelTypeName?"Fuel.".concat(e.fuelTypeName||"default"):"loading")})]}),(0,M.jsxs)("div",{className:"flex items-center gap-1 w-[100%] sm:w-[33%]",children:[(0,M.jsx)("span",{className:"w-[20%] flex justify-end",children:(0,M.jsx)(ce.oNH,{className:"text-[#878787]"})}),(0,M.jsx)("span",{className:"w-[80%] text-[#434343] dark:text-gray-200 truncate",children:"cccc"})]}),(0,M.jsxs)("div",{className:"flex items-center gap-1 w-[100%] sm:w-[33%] justify-end",children:[(0,M.jsx)(Pe.XXI,{className:"text-[#878787]"}),(0,M.jsx)("span",{className:"text-[#434343] dark:text-gray-200 truncate",children:i(null!==e&&void 0!==e&&e.transmissionType?"Transmission.".concat(e.transmissionType||"default"):"loading")})]})]})]}),(0,M.jsxs)("div",{className:"flex justify-between items-center ",children:[(0,M.jsxs)("p",{className:"xxxsm:text-[8px] xxsm:text-[10px] truncate xxxsm:tracking-tight text-xs text-[#434343] dark:text-gray-200 ",children:[i("updated"),null!==e&&void 0!==e&&e.addedDate&&!isNaN(new Date(null===e||void 0===e?void 0:e.addedDate))?" ".concat(Math.floor((new Date-ne
1w Date(null===e||void 0===e?void 0:e.addedDate))/2592e6)>=1?"".concat(Math.floor((new Date-new Date(null===e||void 0===e?void 0:e.addedDate))/2592e6)," ").concat(i("month")).concat(Math.floor((new Date-new Date(null===e||void 0===e?void 0:e.addedDate))/2592e6)>1?"s":""," ").concat(i("ago")):Math.floor((new Date-new Date(null===e||void 0===e?void 0:e.addedDate))/864e5)>=1?"".concat(Math.floor((new Date-new Date(null===e||void 0===e?void 0:e.addedDate))/864e5)," ").concat(i("day")).concat(Math.floor((new Date-new Date(null===e||void 0===e?void 0:e.addedDate))/864e5)>1?"s":""," ").concat(i("ago")):Math.floor((new Date-new Date(null===e||void 0===e?void 0:e.addedDate))/36e5)>=1?"".concat(Math.floor((new Date-new Date(null===e||void 0===e?void 0:e.addedDate))/36e5)," ").concat(i("hour")).concat(Math.floor((new Date-new Date(null===e||void 0===e?void 0:e.addedDate))/36e5)>1?"s":""," ").concat(i("ago")):"".concat(Math.floor((new Date-new Date(null===e||void 0===e?void 0:e.addedDate))/6e4)," ").concat(i("minute")).concat(1!==Math.floor((new Date-new Date(null===e||void 0===e?void 0:e.addedDate))/6e4)?"s":""," ").concat(i("ago"))):i("")]}),(0,M.jsx)("div",{className:"relative inline-block group"})]})]}),(0,M.jsxs)("div",{className:"".concat("list"===je&&"md:flex 2xl:gap-2 4xl:gap-3 5xl:gap-4 font-normal xxxsm:hidden"," ").concat("grid"===je&&"flex gap-2 2xl:gap-3 4xl:gap-4 flex-wrap h-[50px] "," "),children:[(0,M.jsx)("div",{className:'after:content-["|"] flex justify-center items-center after:text-[#cbd4d9]  md:text-sm lg:text-base 3xl:text-[19px] 4xl:text-[21px] 5xl:text-[23px] 6xl:text-[25px]   gap-2 text-[#434343]  dark:text-gray-200 ',children:null===e||void 0===e?void 0:e.year}),(0,M.jsxs)("div",{className:" ".concat("list"===je&&" pl-2 ",' after:content-["|"] flex justify-center items-center after:text-[#cbd4d9] md:text-sm lg:text-base 3xl:text-[19px] 4xl:text-[21px] 5xl:text-[23px] 6xl:text-[25px]   gap-2 text-[#434343] dark:text-gray-200 '),children:[null===e||void 0===e?void 0:e.mileage,"km"]}),(0,M.jsx)("div",{className:" ".concat("list"===je&&" pl-2",' after:content-["|"] flex justify-center items-center after:text-[#cbd4d9] md:text-sm lg:text-base 3xl:text-[19px] 4xl:text-[21px] 5xl:text-[23px] 6xl:text-[25px]    gap-2 text-[#434343] dark:text-gray-200'),children:i(null!==e&&void 0!==e&&e.fuelTypeName?"Fuel.".concat(e.fuelTypeName||"default"):"loading")}),(0,M.jsx)("div",{className:" ".concat("list"===je&&" pl-2"," flex justify-center items-center after:text-[#cbd4d9] md:text-sm lg:text-base 3xl:text-[19px] 4xl:text-[21px] 5xl:text-[23px] 6xl:text-[25px]  gap-2 text-[#434343] dark:text-gray-200"),children:i(null!==e&&void 0!==e&&e.transmissionType?"Transmission.".concat(e.transmissionType||"default"):"loading")})]}),(0,M.jsx)("div",{children:(0,M.jsx)("h1",{className:"".concat("grid"===je&&"text-[#3eb549] dark:text-[#2E9442] font-bold md:text-base lg:text-lg 3xl:text-lg 4xl:text-xl 5xl:text-2xl 6xl:text-[28px]  pt-1"," ").concat("list"===je&&"hidden"," "),children:null!==e&&void 0!==e&&e.price?(0,M.jsxs)(M.Fragment,{children:["BHD ",e.price.toLocaleString()]}):null!==e&&void 0!==e&&e.expectedbids?(0,M.jsxs)(M.Fragment,{children:[i("expected bid"),": BHD",e.expectedbids>=1e7?(e.expectedbids/1e7).toFixed(2):e.expectedbids>=1e5?(e.expectedbids/1e5).toFixed(2):e.expectedbids.toLocaleString("en-IN")]}):null})}),(0,M.jsxs)("div",{className:" ".concat("list"===je&&"md:flex items-center justify-between xxxsm:hidden "," ").concat("grid"===je&&"flex flex-col "),children:[(0,M.jsxs)("p",{className:"xxxsm:text-xs xxsm:text-xs truncate text-xs 3xl:text-sm 4xl:text-[15px] 5xl:text-[17px] 6xl:text-lg text-[#434343] dark:text-gray-200 ",children:[i("updated"),null!==e&&void 0!==e&&e.addedDate&&!isNaN(new Date(null===e||void 0===e?void 0:e.addedDate))?" ".concat(Math.floor((new Date-new Date(null===e||void 0===e?void 0:e.addedDate))/2592e6)>=1?"".concat(Math.floor((new Date-new Date(null===e||void 0===e?void 0:e.addedDate))/2592e6)," ").concat(i("month")).concat((Math.floor((new Date-new Date(null===e||void 0===e?void 0:e.addedDate))/2592e6),"")," ").concat(i("ago")):Math.floor((new Date-ne
1w Date(null===e||void 0===e?void 0:e.addedDate))/864e5)>=1?"".concat(Math.floor((new Date-new Date(null===e||void 0===e?void 0:e.addedDate))/864e5)," ").concat(i("day")).concat((Math.floor((new Date-new Date(null===e||void 0===e?void 0:e.addedDate))/864e5),"")," ").concat(i("ago")):Math.floor((new Date-new Date(null===e||void 0===e?void 0:e.addedDate))/36e5)>=1?"".concat(Math.floor((new Date-new Date(null===e||void 0===e?void 0:e.addedDate))/36e5)," ").concat(i("hour")).concat((Math.floor((new Date-new Date(null===e||void 0===e?void 0:e.addedDate))/36e5),"")," ").concat(i("ago")):"".concat(Math.floor((new Date-new Date(null===e||void 0===e?void 0:e.addedDate))/6e4)," ").concat(i("minute")).concat((Math.floor((new Date-new Date(null===e||void 0===e?void 0:e.addedDate))/6e4),"")," ").concat(i("ago"))):i("")]}),(0,M.jsx)("h1",{})]}),(null===e||void 0===e?void 0:e.biddingVehicle)&&(0,M.jsx)(M.Fragment,{children:(0,M.jsxs)("div",{className:"".concat("grid"===je&&" flex pt-5 "," ").concat("list"===je&&"hidden"),children:[(0,M.jsxs)("div",{className:"flex justify-around   ".concat("ar"===o.language?"rounded-r-full":"rounded-l-full","   py-[2px] w-full  items-center shadow-md   ").concat(void 0===h[null===e||void 0===e?void 0:e.vehicleid]||f.editMode||f.vehicleid!==(null===e||void 0===e?void 0:e.vehicleid)?"border border-[#E5E7EB] dark:border-light-border":"border-none shadow-none"),children:[(0,M.jsx)("div",{className:"p-[8px] 2xl:p-[11px] 3xl:p-[13px] 4xl:p-[15px] 5xl:p-[17px] 6xl:p-[19px] text-white bg-blue-400 rounded-full   ".concat("ar"===o.language?"mr-1":"ml-1"," "),children:(0,M.jsx)(Be.cMR,{className:"text-[15px]  2xl:text-[17px] 3xl:text-lg 4xl:text-xl 5xl:text-2xl 6xl:text-[26px]"})}),void 0===h[null===e||void 0===e?void 0:e.vehicleid]||f.editMode&&f.vehicleid===(null===e||void 0===e?void 0:e.vehicleid)?(0,M.jsx)("input",{type:"text",placeholder:i("enter a bidding"),className:"outline-none dark:bg-dark-from dark:text-gray-300 text-sm placeholder:2xl:text-base 2xl:text-base placeholder:3xl:text-[17px] 3xl:text-[17px] placeholder:4xl:text-[19px] 4xl:text-[19px]  placeholder:5xl:text-[23px] placeholder:6xl:text-[25px]  5xl:text-[23px] 6xl:text-[25px]  w-full ".concat("ar"===o.language?"pr-2 2xl:pr-2 4xl:pr-3 5xl:pr-4 6xl:pr-5":"pl-2 2xl:pl-2 4xl:pl-3 5xl:pl-4 6xl:pl-5"),required:!0,value:f.vehicleid===(null===e||void 0===e?void 0:e.vehicleid)?f.value:h[null===e||void 0===e?void 0:e.vehicleid]||"",id:(null===e||void 0===e?void 0:e.vehicleid)||"",onChange:t=>{const x=t.target.value;isNaN(x)&&""!==x||v({value:""===x?"":Number(x),vehicleid:(null===e||void 0===e?void 0:e.vehicleid)||null,editMode:!0})}}):(0,M.jsxs)("h1",{className:"text-[#233d7b] dark:text-[#C0CBF9] hover:text-[#39B3D7] dark:hover:text-[#18718A] font-bold text-xs xl:text-sm 2xl:text-base 3xl:text-[17px] 4xl:text-[19px] 5xl:text-[23px] 6xl:text-[25px]  w-full   ".concat("ar"===o.language?"pr-2 2xl:pr-2 4xl:pr-3 5xl:pr-4 6xl:pr-5":"pl-2 2xl:pl-2 4xl:pl-3 5xl:pl-4 6xl:pl-5"," "),children:[i("your bid"),":"," ",h[null===e||void 0===e?void 0:e.vehicleid]]})]}),(0,M.jsx)("div",{className:"flex items-center justify-center  gap-2  border  bg-[#0173E9] border-[#0173E9] text-white  cursor-pointer shadow-md   ".concat("ar"===o.language?"rounded-l-full":"rounded-r-full"),onClick:()=>{null!==f.value&&f.vehicleid===(null===e||void 0===e?void 0:e.vehicleid)?(B(e.vehicleid),g((t=>({...t,[null===e||void 0===e?void 0:e.vehicleid]:f.value}))),v({value:null,vehicleid:null,editMode:!1})):v({value:h[null===e||void 0===e?void 0:e.vehicleid]||"",vehicleid:null===e||void 0===e?void 0:e.vehicleid,editMode:!0})},children:(0,M.jsx)("div",{className:"px-2 2xl:px-[10px] 4xl:px-3 5xl:px-4  py-[10px]  text-xs 2xl:text-sm 3xl:text-base 4xl:text-lg 5xl:text-xl 6xl:text-[22px] whitespace-nowrap  font-semibold ",children:h[null===e||void 0===e?void 0:e.vehicleid]?i("update bid"):i("place bid")})})]})})]})]})]}),(null===e||void 0===e?void 0:e.biddingVehicle)&&(0,M.jsx)(M.Fragment,{children:(0,M.jsx)("div",{className:"".concat("list"===je&&" xxxsm:w-[95%] md:w-[97%] flex xxxsm:justify-center md:justify-end border-t-2 dark:border-light-border mt-1 py-2 2xl:py-3 4xl:py-4 6xl:py-[18px]"," ").concat("grid"===je&&"hidden"),children:(0,M.jsxs)("div",{className:" flex items-center justify-between xxxsm:w-full    md:w-[74%] ",children:[(0,M.jsxs)("div",{className:"flex justify-around  ".concat("ar"===o.language?"xxxsm:rounded-r-full xsm:pr-3 xsm:pl-1":"xxxsm:rounded-l-full xsm:pl-3 xsm:pr-1","  xsm:rounded-full py-[2px] xl:py-1  3xl:py-[5px] 4xl
1:py-[6px] 5xl:py-[7px] 6xl:py-[9px]  xxxsm:w-full xsm:w-[60%] sm:w-[55%] md:w-[60%] xl:w-[50%] 2xl:w-[45%] 4xl:w-[48%] items-center shadow-md   ").concat(void 0===h[null===e||void 0===e?void 0:e.vehicleid]||f.editMode||f.vehicleid!==(null===e||void 0===e?void 0:e.vehicleid)?"border border-[#E5E7EB] dark:border-light-border":"border-none shadow-none"),children:[(0,M.jsx)("div",{className:"p-[8px] text-white bg-blue-400 rounded-full  xxxsm:flex xsm:hidden ".concat("ar"===o.language?"mr-1":"ml-1"," "),children:(0,M.jsx)(Be.cMR,{className:"text-[15px]  "})}),void 0===h[null===e||void 0===e?void 0:e.vehicleid]||f.editMode&&f.vehicleid===(null===e||void 0===e?void 0:e.vehicleid)?(0,M.jsx)("input",{type:"text",placeholder:i("enter a bidding"),className:"outline-none dark:bg-dark-from dark:text-gray-300 text-sm placeholder:2xl:text-base 2xl:text-base placeholder:3xl:text-[17px] 3xl:text-[17px] placeholder:4xl:text-[19px] 4xl:text-[19px]  placeholder:5xl:text-[23px] placeholder:6xl:text-[25px]  5xl:text-[23px] 6xl:text-[25px] w-full ".concat("ar"===o.language?"xxxsm:pr-2 xsm:pr-0 2xl:pr-2 4xl:pr-3 5xl:pr-4 6xl:pr-5":"xxxsm:pl-2 xsm:pl-0 2xl:pl-2 4xl:pl-3 5xl:pl-4 6xl:pl-5"),value:f.vehicleid===(null===e||void 0===e?void 0:e.vehicleid)?f.value:h[null===e||void 0===e?void 0:e.vehicleid]||"",id:(null===e||void 0===e?void 0:e.vehicleid)||"",onChange:t=>{const x=t.target.value;isNaN(x)&&""!==x||v({value:""===x?"":Number(x),vehicleid:(null===e||void 0===e?void 0:e.vehicleid)||null,editMode:!0})}}):(0,M.jsxs)("h1",{className:"text-[#233d7b] dark:text-[#C0CBF9] hover:text-[#39B3D7] dark:hover:text-[#18718A] font-bold text-xs xl:text-sm 2xl:text-base 3xl:text-[17px] 4xl:text-[19px] 5xl:text-[23px] 6xl:text-[25px]  w-full   ".concat("ar"===o.language?"xxxsm:pr-2 xsm:pr-0 2xl:pr-2 4xl:pr-3 5xl:pr-4 6xl:pr-5":"xxxsm:pl-2 xsm:pl-0 2xl:pl-2 4xl:pl-3 5xl:pl-4 6xl:pl-5"),children:[i("your bid"),":"," ",h[null===e||void 0===e?void 0:e.vehicleid]]}),(0,M.jsx)("div",{className:" p-[8px] 2xl:p-[11px] 3xl:p-[13px] 4xl:p-[15px] 5xl:p-[17px] 6xl:p-[19px] text-white bg-blue-400 rounded-full xxxsm:hidden xsm:flex",children:(0,M.jsx)(Be.cMR,{className:"text-[15px] 2xl:text-[17px] 3xl:text-lg 4xl:text-xl 5xl:text-2xl 6xl:text-[26px]"})})]}),(0,M.jsxs)("div",{className:"flex items-center justify-center  gap-2 xsm:px-2  xsm:py-2 3xl:px-[10px] 5xl:py-[10px] 5xl:px-3 6xl:py-[14px] 6xl:px-[14px] border  bg-[#0173E9] border-[#0173E9] text-white  xsm:rounded-sm cursor-pointer shadow-md ".concat("ar"===o.language?"xxxsm:rounded-l-full":"xxxsm:rounded-r-full"),onClick:()=>{f.vehicleid===(null===e||void 0===e?void 0:e.vehicleid)?B(e.vehicleid):v({value:h[null===e||void 0===e?void 0:e.vehicleid]||"",vehicleid:null===e||void 0===e?void 0:e.vehicleid,editMode:!0})},children:[(0,M.jsx)(n.spV,{className:"md:text-[13px] lg:text-sm 2xl:text-base 3xl:text-lg 4xl:text-xl 5xl:text-[22px] 6xl:text-2xl xxxsm:hidden xsm:flex "}),(0,M.jsx)("div",{className:"xxxsm:px-2  xxxsm:py-[10px] xsm:px-0  xsm:py-0 text-xs 2xl:text-sm 3xl:text-base 4xl:text-lg 5xl:text-xl 6xl:text-[22px] whitespace-nowrap  font-semibold ",children:h[null===e||void 0===e?void 0:e.vehicleid]?i("update bid"):i("place bid")})]})]})})})]})}))}),(0,M.jsx)(Me.A,{dir:"",className:" [&_.MuiPaginationItem-root]:dark:!text-gray-200 [&_.MuiPaginationItem-root]:text-gray-700\n                                             \n                                               mt-3 self-center ".concat(null!==ae&&void 0!==ae&&null!==(t=ae.content)&&void 0!==t&&t.length?"":"hidden"),color:"primary",count:null!==ae&&void 0!==ae&&ae.totalPages?null===ae||void 0===ae?void 0:ae.totalPages:1,page:null!==ae&&void 0!==ae&&ae.page?(null===ae||void 0===ae?void 0:ae.page)+1:1,onChange:(e,t)=>
1{ue(!0),setTimeout((()=>{ue(!1)}),2e3),window.scrollTo({top:0}),be(t);const x=new URLSearchParams(z.search);x.set("page",t),F("".concat(z.pathname,"?").concat(x.toString()),{replace:!0})},renderItem:e=>{if("previous"===e.type){const t=window.isArabic?"rotate(180deg)":"rotate(0deg)";return(0,M.jsx)(Ie.A,{...e,sx:e=>({transform:t,"& svg":{color:"dark"===e.palette.mode?"#39B3D7":"white"}})})}if("next"===e.type){const t=window.isArabic?"rotate(180deg)":"rotate(0deg)";return(0,M.jsx)(Ie.A,{...e,sx:e=>({transform:t,"& svg":{color:"dark"===e.palette.mode?"#39B3D7":"white"}})})}return(0,M.jsx)(Ie.A,{...e})}})]}),me&&(0,M.jsx)("div",{className:"fixed inset-0 dark:bg-black/30 bg-white/30 flex justify-center items-center z-50",children:(0,M.jsx)("img",{className:"animate-spin rounded-full w-10 h-10 ",src:"https://res.cloudinary.com/dtlrs3y1y/image/upload/v1758896085/arabiawheel3_ga2o27.jpg",style:{animationDuration:"0.8s"}})})]})})]})]})};x(52502);var Ve=x(11577),_e=x(23156),Oe=x(82639),He=x(60397),We=x(78973),Ue=(x(19473),x(96058)),Ye=x(49342),Ke=x(9634);const Ge=()=>{var e,t,x,h,g,f,v,b,w,y,j,N,k,C,D,A,S;const B=(0,u.Zp)(),z=localStorage.getItem("automotors__UserData"),[F,E]=(0,l.useState)({}),[I,L]=(0,l.useState)([]);(0,l.useEffect)((()=>{(async()=>{try{var e,t;const x=await s.A.get("".concat("https://www.arabiawheel.com/automotor","/api/vehicles/forsimilarads?makeId=").concat(null===F||void 0===F||null===(e=F.model)||void 0===e||null===(t=e.make)||void 0===t?void 0:t.id,"&limit=4&vehicleCategory=").concat(null===F||void 0===F?void 0:F.vehicleCategory));L(x.data)}catch(x){console.error("Error fetching similar ads:",x)}})()}),[null===F||void 0===F||null===(e=F.model)||void 0===e||null===(t=e.make)||void 0===t?void 0:t.id,null===F||void 0===F?void 0:F.vehicleCategory]),(0,l.useEffect)((()=>{(async()=>{try{const e=await s.A.get("".concat("https://www.arabiawheel.com/automotor","/api/vehicles/").concat(_));E(e.data)}catch(e){"Vehicle not found"===e.response.data.message?B("/not-found"):console.error("Error fetching vehicle data:",e)}})()}),[]);const{t:T,i18n:P}=(0,p.Bd)(),{make:R,model:q,year:V,vehicleId:_}=(0,u.g)(),[O,H]=((_||"").split("-").pop(),(0,l.useState)({vehicleid:null,value:null})),[W,U]=(0,l.useState)({}),[Y,K]=(0,l.useState)("");(0,l.useEffect)((()=>{_&&(async()=>{try{const e=localStorage.getItem("automotors__UserData");if(e){const t=(0,d.s)(e).id,x=await s.A.get("".concat("https://www.arabiawheel.com/automotor","/bids/userbids/").concat(t));if(x.data){const e=x.data.find((e=>String(e.vehicleId)===String(_)));e&&H({vehicleid:_,value:e.biddingPrice})}}}catch(e){console.error("Error fetching bid:",e)}})()}),[_]);const G=async e=>{if(!Y||isNaN(Y)||Y<=0)r.oR.info("Please enter a valid bidding amount.");else try{const t=localStorage.getItem("automotors__UserData");if(!t)return void r.oR.error("User not authenticated.");const x=(0,d.s)(t).id,l=(await s.A.get("".concat("https://www.arabiawheel.com/automotor","/bids/userbids/").concat(x))).data.find((t=>String(t.vehicleId)===String(e)));l&&l.biddingPrice?(await s.A.put("".concat("https://www.arabiawheel.com/automotor","/bids/updateBids/").concat(e),{biddingprice:Y},{headers:{Authorization:"Bearer ".concat(z)}}),r.oR.success("Bid updated successfully!")):(await s.A.post("".concat("https://www.arabiawheel.com/automotor","/bids/placeBid"),{user:{id:x},vehicle:{id:e},biddingprice:Y},{headers:{Authorization:"Bearer ".concat(z)}}),r.oR.success("Bid placed successfully!")),U((t=>({...t,[e]:O.value}))),H({vehicleid:e,value:Y}),K("")}catch(t){console.error("Error placing or updating bid:",t),r.oR.error("Failed to place or update bid. Please try again.")}},[$,J]=(0,l.useState)(!1),[X,Z]=(0,l.useState)(!1),[Q,ee]=(0,l.useState)("+923098575579"),[te,xe]=(0,l.useState)("Hello Atif Hussain I am Interested in Your Suzuki Margalla"),[le,ae]=(0,l.useState)({ABS:(0,M.jsx)(Oe.vrb,{className:"translate-y-1 text-gray-600  dark:text-gray-400 3xl:text-lg 4xl:text-xl 5xl:text-2xl 6xl:text-[25px]"}),"Air Conditioning":(0,M.jsx)(c.f_W,{className:"translate-y-1 text-gray-600 dark:text-gray-400 3xl:text-lg 4xl:text-xl 5xl:text-2xl 6xl:text-[25px]"}),"Alloy Wheels":(0,M.jsx)(Le.uJN,{className:"translate-y-1 text-gray-600 dark:text-gray-400 3xl:text-lg 4xl:text-xl 5xl:text-2xl 6xl:text-[25px]"}
1),"FM/AM Radio":(0,M.jsx)(_e.HOc,{className:"translate-y-1 text-gray-600 dark:text-gray-400 3xl:text-lg 4xl:text-xl 5xl:text-2xl 6xl:text-[25px]"}),"Cassette Player":(0,M.jsx)(Le.s_q,{className:"translate-y-1 text-gray-600 dark:text-gray-400 3xl:text-lg 4xl:text-xl 5xl:text-2xl 6xl:text-[25px]"}),"CD Player":(0,M.jsx)(_e.rkJ,{className:"translate-y-1 text-gray-600 dark:text-gray-400 3xl:text-lg 4xl:text-xl 5xl:text-2xl 6xl:text-[25px]"}),CoolBox:(0,M.jsx)(a.rrY,{className:"translate-y-1 text-gray-600 dark:text-gray-400 3xl:text-lg 4xl:text-xl 5xl:text-2xl 6xl:text-[25px]"}),"Cruise Control":(0,M.jsx)(a.Qro,{className:"translate-y-1 text-gray-600 dark:text-gray-400 3xl:text-lg 4xl:text-xl 5xl:text-2xl 6xl:text-[25px]"}),"Climate Control":(0,M.jsx)(Pe.IQh,{className:"translate-y-1 text-gray-600 dark:text-gray-400 3xl:text-lg 4xl:text-xl 5xl:text-2xl 6xl:text-[25px]"}),"DVD Player":(0,M.jsx)(n.BZW,{className:"translate-y-1 text-gray-600 dark:text-gray-400 3xl:text-lg 4xl:text-xl 5xl:text-2xl 6xl:text-[25px]"}),"Front Speakers":(0,M.jsx)(_e.dN9,{className:"translate-y-1 text-gray-600 dark:text-gray-400 3xl:text-lg 4xl:text-xl 5xl:text-2xl 6xl:text-[25px]"}),"Front Camera":(0,M.jsx)(_e.dN9,{className:"translate-y-1 text-gray-600 dark:text-gray-400 3xl:text-lg 4xl:text-xl 5xl:text-2xl 6xl:text-[25px]"}),"Heated Seats":(0,M.jsx)(o.n8P,{className:"translate-y-1 text-gray-600 dark:text-gray-400 3xl:text-lg 4xl:text-xl 5xl:text-2xl 6xl:text-[25px]"}),Immobilizer:(0,M.jsx)(o.FwS,{className:"translate-y-1 text-gray-600 dark:text-gray-400 3xl:text-lg 4xl:text-xl 5xl:text-2xl 6xl:text-[25px]"}),"Keyless Entry":(0,M.jsx)(He.EWw,{className:"translate-y-1 text-gray-600 dark:text-gray-400 3xl:text-lg 4xl:text-xl 5xl:text-2xl 6xl:text-[25px]"}),"Navigation System":(0,M.jsx)(He.W2c,{className:"translate-y-1 text-gray-600 dark:text-gray-400 3xl:text-lg 4xl:text-xl 5xl:text-2xl 6xl:text-[25px]"}),"Power Locks":(0,M.jsx)(ce.e8f,{className:"translate-y-1 text-gray-600 dark:text-gray-400 3xl:text-lg 4xl:text-xl 5xl:text-2xl 6xl:text-[25px]"}),"Power Mirrors":(0,M.jsx)(Oe.UDI,{className:"translate-y-1 text-gray-600 dark:text-gray-400 3xl:text-lg 4xl:text-xl 5xl:text-2xl 6xl:text-[25px]"}),"Power Steering":(0,M.jsx)(Oe.$X0,{className:"translate-y-1 text-gray-600 dark:text-gray-400 3xl:text-lg 4xl:text-xl 5xl:text-2xl 6xl:text-[25px]"}),"Power Windows":(0,M.jsx)(o.qpC,{className:"translate-y-1 text-gray-600 dark:text-gray-400 3xl:text-lg 4xl:text-xl 5xl:text-2xl 6xl:text-[25px]"}),"Rear Seat Entertainment":(0,M.jsx)(o.jVn,{className:"translate-y-1 text-gray-600 dark:text-gray-400 3xl:text-lg 4xl:text-xl 5xl:text-2xl 6xl:text-[25px]"}),"Rear AC Vents":(0,M.jsx)(We.nV6,{className:"translate-y-1 text-gray-600 dark:text-gray-400 3xl:text-lg 4xl:text-xl 5xl:text-2xl 6xl:text-[25px]"}),"Rear Speakers":(0,M.jsx)(Oe.hSp,{className:"translate-y-1 text-gray-600 dark:text-gray-400 3xl:text-lg 4xl:text-xl 5xl:text-2xl 6xl:text-[25px]"}),"Rear Camera":(0,M.jsx)(We._sT,{className:"translate-y-1 text-gray-600 dark:text-gray-400 3xl:text-lg 4xl:text-xl 5xl:text-2xl 6xl:text-[25px]"}),"Sun Roof":(0,M.jsx)(Oe.$X0,{className:"translate-y-1 text-gray-600 dark:text-gray-400 3xl:text-lg 4xl:text-xl 5xl:text-2xl 6xl:text-[25px]"}),"Steering Switches":(0,M.jsx)(ge.lfH,{className:"translate-y-1 text-gray-600 dark:text-gray-400 3xl:text-lg 4xl:text-xl 5xl:text-2xl 6xl:text-[25px] "}),"USB and Auxiliary Cable":(0,M.jsx)(Oe.m28,{className:"translate-y-1 text-gray-600 dark:text-gray-400 3xl:text-lg 4xl:text-xl 5xl:text-2xl 6xl:text-[25px]"})}),[se,re]=(0,l.useState)("Suzuki Swift DLX 1.3 Navigation 2018"),[ie,de]=((0,i.d4)((e=>e.auth.navheight)),(0,l.useState)(80));(0,l.useEffect)((()=>{const e=()=>{const e=window.innerWidth;de(e>=1280?130:e>=1024?125:e>=768?120:e>=640?115:e>=530?110:e>=430?100:95)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]);const[ne,oe]=(0,l.useState)(!1),[pe,me]=(0,l.useState)(!0),ue=(0,l.useRef)(null);(0,l.useEffect)((()=>{const e=ue.current;e&&(oe(e.scrollLeft>0),me(e.scrollLeft<e.scrollWidth-e.clientWidth))}),[]);const he=(0,l.useRef)(null),[fe,ve]=(0,l.useState)(0);return(0,l.useEffect)((()=>
1{if(he.current){const e=he.current.querySelector(".thumbs-wrapper"),t=he.current.querySelector(".thumbs");if(e&&t){const x=e.offsetWidth,l=t.scrollWidth,a=t.children[fe];if(a){let e=x/2-a.offsetLeft-a.offsetWidth/2;e>0&&(e=0),Math.abs(e)+x>l&&(e=-(l-x)),t.style.transition="transform 0.35s ease-in-out",t.style.transform="translate3d(".concat(e,"px, 0, 0)")}let s,r,i=!1;const d=t=>{i=!0,s=t.pageX||t.touches[0].pageX,r=e.scrollLeft,e.style.cursor="grabbing"},n=()=>{i=!1,e.style.cursor="grab"},o=t=>{if(!i)return;t.preventDefault();const x=1.5*((t.pageX||t.touches[0].pageX)-s);e.scrollLeft=r-x};return e.addEventListener("mousedown",d),e.addEventListener("mouseleave",n),e.addEventListener("mouseup",n),e.addEventListener("mousemove",o),e.addEventListener("touchstart",d),e.addEventListener("touchend",n),e.addEventListener("touchmove",o),()=>{e.removeEventListener("mousedown",d),e.removeEventListener("mouseleave",n),e.removeEventListener("mouseup",n),e.removeEventListener("mousemove",o),e.removeEventListener("touchstart",d),e.removeEventListener("touchend",n),e.removeEventListener("touchmove",o)}}}}),[fe]),(0,M.jsxs)("div",{dir:window.directionTo,children:[(0,M.jsxs)(m.mg,{children:[(0,M.jsx)("title",{children:T("carDetailTitle")}),(0,M.jsx)("meta",{name:"description",content:T("carDetailDescription")}),(0,M.jsx)("meta",{name:"keywords",content:T("carDetailKeywords")}),(0,M.jsx)("meta",{name:"robots",content:"index, follow"}),(0,M.jsx)("meta",{name:"author",content:"Arabiawheel Team"}),(0,M.jsx)("meta",{name:"publisher",content:"Arabiawheel"}),(0,M.jsx)("link",{rel:"canonical",href:"http://localhost:3000/"}),(0,M.jsx)("meta",{name:"lang",content:P.language})]}),(0,M.jsxs)("div",{style:{contain:"inline-size"},className:"xxxsm:w-full sm:w-[90%] md:w-[95%] mx-auto lg:w-[97%] sm:pt-4 xl:pt-5",children:[(0,M.jsxs)("div",{className:"lg:flex gap-5  mb-9 ",children:[(0,M.jsx)("div",{className:" sm:border sm:border-[#e6e6e6] dark:border-light-border xxxsm:w-full lg:w-[60%] xl:w-[63%] h-full gap-3 bg-indigo-100 dark:bg-dark-from  flex flex-col ",children:(0,M.jsxs)("div",{className:"bg-white dark:bg-dark-from sm:shadow-lg lg:shadow-none   w-[100%] sm:p-8 flex flex-col ",children:[(0,M.jsxs)("h1",{className:"  xxxsm:mx-4 sm:mx-0 xxxsm:text-[#373737] dark:xxxsm:text-main-heading-white xxxsm:text-[18px] xxxsm:font-medium  xxxsm:order-2 sm:order-1  font-lato lg:text-[#233d7b] dark:lg:text-[#C0CBF9] lg:font-bold lg:text-xl 2xl:text-[23px] 3xl:text-[26px] 4xl:text-3xl 5xl:tex-[32px] 6xl:text-[35px] flex  justify-between   ",children:[(0,M.jsxs)("span",{children:[T("Make.".concat(null===F||void 0===F||null===(x=F.model)||void 0===x||null===(h=x.make)||void 0===h?void 0:h.name))," ",T("Model.".concat(null===F||void 0===F||null===(g=F.model)||void 0===g?void 0:g.name))," ",null===F||void 0===F||null===(f=F.carVersion)||void 0===f?void 0:f.name," ",null===F||void 0===F?void 0:F.year]})," ",(0,M.jsxs)("span",{className:"  text-[#373737]  text-xl font-bold font-lato xxxsm:hidden   ",children:["BHD ",null===F||void 0===F?void 0:F.expectedbids]})]}),(0,M.jsxs)("span",{className:"xxxsm:mx-4 sm:mx-0 text-[#373737] dark:text-main-heading-white mt-1 text-xl font-bold xxxsm:order-3 sm:order-2 font-lato xxxsm:flex lg:hidden",children:["BHD ",null===F||void 0===F?void 0:F.expectedbids]}),(0,M.jsxs)("h3",{className:"xxxsm:mx-4 sm:mx-0 xxxsm:text-[#595959] dark:xxxsm:text-gray-400 xxxsm:order-4 sm:order-2 mt-1 lg:text-[#518ecb] xxxsm:font-normal lg:font-semibold flex sm:mb-3 2xl:text-[19px] 3xl:text-[22px] 4xl:text-[25px] 5xl:text-[27px] 6xl:text-[29px] ",children:[(0,M.jsx)(Ce.eVO,{className:"translate-y-1 "}),T("City.".concat(null===F||void 0===F?void 0:F.cityName))]}),(0,M.jsx)("div",{id:"section1",ref:he,className:"relative xxxsm:order-1 sm:order-3",dir:"ltr",children:(0,M.jsx)(Ve.FN,{className:"flex flex-col -space-y-4",showIndicators:!1,interval:1e3,thumbWidth:ie,showStatus:!0,showThumbs:!0,onChange:e=>ve(e),renderThumbs:()=>{var e;return null===F||void 0===F||null===(e=F.images)||void 0===e?void 0:e.map((e=>(0,M.jsx)("div",{className:"xxxsm:h-[50px] sm:h-[55px] md:h-[57px] lg:h-[60px] 2xl:h-[75px] 3xl:h-[85px] 4xl
1:h-[100px] 5xl:h-[135px] w-[".concat(ie,"px] flex items-center justify-center border border-gray-300 "),children:(0,M.jsx)("img",{className:"object-cover h-full w-full",src:e.cloudinary_src,loading:"lazy",alt:"thumbnail"})},e.id)))},children:null===F||void 0===F||null===(v=F.images)||void 0===v?void 0:v.map((e=>(0,M.jsx)("div",{className:"flex justify-center items-center bg-gray-600",children:(0,M.jsx)("div",{className:" bg-gray-600 xxxsm:w-full xxxsm:h-[280px] xxsm:h-[320px] xsm:h-[350px] sm:h-[370px] md:h-[390px]  lg:h-[450px] 2xl:h-[475px] 3xl:h-[485px] 4xl:h-[530px] 5xl:h-[560px] 6xl:h-[650px] items-center flex justify-center  lg:w-[600px] 4xl:w-[630px] 5xl:w-[700px] 6xl:w-[720px]",children:(0,M.jsx)("img",{className:"ml-auto ",src:e.cloudinary_src,alt:"Car Image",loading:"lazy"})})},e.id)))})}),(0,M.jsxs)("div",{className:" xxxsm:mx-4 sm:mx-0 xxxsm:mt-3 lg:mt-7 xxxsm:order-5 sm:order-4  grid grid-cols-[1fr,1fr,1fr,1fr] xxxsm:h-[75px] lg:h-[94px] 3xl:h-[105px] 4xl:h-[115px] 5xl:h-[125px] 6xl:h-[135px] ",children:[(0,M.jsxs)("div",{className:"lg:border dark:lg:border-light-border flex flex-col gap-2 4xl:gap-3 5xl:gap-[14px] justify-center items-center",children:[(0,M.jsx)("span",{children:(0,M.jsx)(a.LyP,{className:"xxxsm:text-[#182953]  dark:text-gray-400 lg:text-gray-600 xxxsm:text-[21px] sm:text-[23px] lg:text-[25px] 3xl:text-[28px]  4xl:text-3xl 5xl:text-[32px] 6xl:text-[34px]"})}),(0,M.jsx)("span",{className:"xxxsm:text-[#1877f2] xxxsm:text-xs sm:text-sm lg:text-[16px] 3xl:text-lg 4xl:text-[22px] 5xl:text-2xl 6xl:text-[26px] lg:text-[#518ecb]",children:null===F||void 0===F?void 0:F.year})]}),(0,M.jsxs)("div",{className:" lg:border dark:lg:border-light-border flex flex-col gap-2 4xl:gap-3 5xl:gap-[14px] justify-center items-center",children:[(0,M.jsx)("span",{children:(0,M.jsx)(c.Fj9,{className:"xxxsm:text-[#182953] dark:text-gray-400 lg:text-gray-600 xxxsm:text-[21px] sm:text-[23px] lg:text-[25px] 3xl:text-[28px] 4xl:text-3xl  5xl:text-[32px] 6xl:text-[34px]"})}),(0,M.jsxs)("span",{dir:"ltr",className:"xxxsm:text-[#1877f2] xxxsm:text-xs  sm:text-sm  lg:text-[16px] 3xl:text-lg 4xl:text-[22px] 5xl:text-2xl 6xl:text-[26px] lg:text-[#518ecb]",children:[null===F||void 0===F||null===(b=F.mileage)||void 0===b?void 0:b.toLocaleString()," km"]})]}),(0,M.jsxs)("div",{className:"lg:border dark:lg:border-light-border flex flex-col gap-2 4xl:gap-3 5xl:gap-[14px] justify-center items-center",children:[(0,M.jsx)("span",{children:(0,M.jsx)(_e.dD7,{className:"xxxsm:text-[#182953] dark:text-gray-400 lg:text-gray-600 xxxsm:text-[21px] sm:text-[23px] lg:text-[25px] 3xl:text-[28px] 4xl:text-3xl 5xl:text-[32px] 6xl:text-[34px]"})}),(0,M.jsx)("span",{className:"xxxsm:text-[#1877f2] xxxsm:text-xs  sm:text-sm   lg:text-[16px] 3xl:text-lg 4xl:text-[22px] 5xl:text-2xl 6xl:text-[26px] lg:text-[#518ecb]",children:T("Fuel.".concat(null===F||void 0===F?void 0:F.fuelType))})]}),(0,M.jsxs)("div",{className:"lg:border dark:lg:border-light-border flex flex-col gap-2 4xl:gap-3 5xl:gap-[14px] justify-center items-center",children:[(0,M.jsx)("span",{children:(0,M.jsx)(Oe.BU1,{className:"xxxsm:text-[#182953] dark:text-gray-400 lg:text-gray-600 xxxsm:text-[21px] sm:text-[23px] lg:text-[25px] 3xl:text-[28px] 4xl:text-3xl 5xl:text-[32px] 6xl:text-[34px]"})}),(0,M.jsx)("span",{className:"xxxsm:text-[#1877f2] xxxsm:text-xs  sm:text-sm  lg:text-[16px] 3xl:text-lg 4xl:text-[22px] 5xl:text-2xl 6xl:text-[26px] lg:text-[#518ecb]",children:T("Transmission.".concat(null===F||void 0===F?void 0:F.transmission))})]})]}),(0,M.jsxs)("div",{id:"section2",className:"xxxsm:mx-4 sm:mx-0 xxxsm:mt-7 xxxsm:order-6 sm:order-5 lg:mt-10 grid xxxsm:grid-cols-1 lg:grid-cols-[1fr,1fr] gap-3 2xl:gap-7 3xl:gap-8 4xl:gap-10 5xl:gap-11 ",children:[(0,M.jsxs)("div",{className:"gap-3 flex font-sans flex-col",children:[(0,M.jsxs)("div",{className:"flex border-t dark:border-light-border  justify-between ",children:[(0,M.jsx)("span",{className:"mt-2 2xl:mt-3 4xl:mt-[14px] 5xl:mt-4 6xl:mt-[21px] 6xl:mb-2 font-semibold xxxsm:text-sm xsm:text-[15px]  sm:text-[16px] 3xl:text-lg 4xl:text-[21px] 5xl:text-[25px] 6xl:text-[27px] text-[#434343] dark:text-gray-300",children:T("fuel type")}
1),(0,M.jsx)("span",{className:"mt-2 2xl:mt-3 4xl:mt-[14px] 5xl:mt-4 6xl:mt-[21px] 6xl:mb-2 xxxsm:text-sm xsm:text-[15px]  sm:text-[16px] 3xl:text-lg 4xl:text-[21px] 5xl:text-[25px] 6xl:text-[27px]  font-sans text-[#595959] dark:text-gray-400",children:T("Fuel.".concat(null===F||void 0===F?void 0:F.fuelType))})]}),(0,M.jsxs)("div",{className:"flex border-t dark:border-light-border  justify-between",children:[(0,M.jsx)("span",{className:"mt-2 2xl:mt-3 4xl:mt-[14px] 5xl:mt-4 6xl:mt-[21px] 6xl:mb-2  font-semibold text-[#434343] dark:text-gray-300 xxxsm:text-sm xsm:text-[15px]  sm:text-[16px] 3xl:text-lg 4xl:text-[21px] 5xl:text-[25px] 6xl:text-[27px]",children:T("driven")}),(0,M.jsx)("span",{className:"mt-2 2xl:mt-3 4xl:mt-[14px] 5xl:mt-4 6xl:mt-[21px] 6xl:mb-2  font-sans text-[#595959] dark:text-gray-400 xxxsm:text-sm xsm:text-[15px]  sm:text-[16px] 3xl:text-lg 4xl:text-[21px] 5xl:text-[25px] 6xl:text-[27px]",children:null===F||void 0===F?void 0:F.mileage})]}),(0,M.jsxs)("div",{className:"flex border-t dark:border-light-border  justify-between",children:[(0,M.jsxs)("span",{className:"mt-2 2xl:mt-3 4xl:mt-[14px] 5xl:mt-4 6xl:mt-[21px] 6xl:mb-2 font-semibold text-[#434343] dark:text-gray-300 xxxsm:text-sm xsm:text-[15px]  sm:text-[16px] 3xl:text-lg 4xl:text-[21px] 5xl:text-[25px] 6xl:text-[27px]",children:[T("body type")," "]}),(0,M.jsx)("span",{className:"mt-2 2xl:mt-3 4xl:mt-[14px] 5xl:mt-4 6xl:mt-[21px] 6xl:mb-2  font-sans text-[#595959] dark:text-gray-400 xxxsm:text-sm xsm:text-[15px]  sm:text-[16px] 3xl:text-lg 4xl:text-[21px] 5xl:text-[25px] 6xl:text-[27px]",children:T("VehicleTypes.".concat(null===F||void 0===F?void 0:F.vehicleType))})]}),(0,M.jsxs)("div",{className:"flex border-t dark:border-light-border justify-between",children:[(0,M.jsxs)("span",{className:"mt-2 2xl:mt-3 4xl:mt-[14px] 5xl:mt-4 6xl:mt-[21px] 6xl:mb-2 font-semibold text-[#434343] dark:text-gray-300 xxxsm:text-sm xsm:text-[15px]  sm:text-[16px] 3xl:text-lg 4xl:text-[21px] 5xl:text-[25px] 6xl:text-[27px]",children:[T("ad ref"),"#"]}),(0,M.jsx)("span",{className:"mt-2  2xl:mt-3 4xl:mt-[14px] 5xl:mt-4 6xl:mt-[21px] 6xl:mb-2 font-sans text-[#595959] dark:text-gray-400 xxxsm:text-sm xsm:text-[15px]  sm:text-[16px] 3xl:text-lg 4xl:text-[21px] 5xl:text-[25px] 6xl:text-[27px]",children:null===F||void 0===F?void 0:F.id})]})]}),(0,M.jsxs)("div",{className:"gap-3 flex font-sans flex-col",children:[(0,M.jsxs)("div",{className:"flex border-t dark:border-light-border justify-between",children:[(0,M.jsx)("span",{className:"mt-2 2xl:mt-3 4xl:mt-[14px] 5xl:mt-4 6xl:mt-[21px] 6xl:mb-2 font-semibold text-[#434343] dark:text-gray-300 xxxsm:text-sm xsm:text-[15px]  sm:text-[16px] 3xl:text-lg 4xl:text-[21px] 5xl:text-[25px] 6xl:text-[27px]",children:T("color")}),(0,M.jsx)("span",{className:"mt-2 2xl:mt-3 4xl:mt-[14px] 5xl:mt-4 6xl:mt-[21px] 6xl:mb-2 font-sans text-[#595959] dark:text-gray-400 xxxsm:text-sm xsm:text-[15px]  sm:text-[16px] 3xl:text-lg 4xl:text-[21px] 5xl:text-[25px] 6xl:text-[27px]",children:T("Color.".concat(null===F||void 0===F?void 0:F.color))})]}),(0,M.jsxs)("div",{className:"flex border-t dark:border-light-border justify-between",children:[(0,M.jsx)("span",{className:"mt-2 2xl:mt-3 4xl:mt-[14px] 5xl:mt-4 6xl:mt-[21px] 6xl:mb-2 font-semibold text-[#434343] dark:text-gray-300 xxxsm:text-sm xsm:text-[15px]  sm:text-[16px] 3xl:text-lg 4xl:text-[21px] 5xl:text-[25px] 6xl:text-[27px]",children:T("engine capacity")}),(0,M.jsxs)("span",{dir:"ltr",className:"mt-2 2xl:mt-3 4xl:mt-[14px] 5xl:mt-4 6xl:mt-[21px] 6xl:mb-2 font-sans text-[#595959] dark:text-gray-400 xxxsm:text-sm xsm:text-[15px]  sm:text-[16px] 3xl:text-lg 4xl:text-[21px] 5xl:text-[25px] 6xl:text-[27px]",children:[null===F||void 0===F?void 0:F.displacementcc," cc"]})]}),(0,M.jsxs)("div",{className:"flex border-t dark:border-light-border justify-between",children:[(0,M.jsx)("span",{className:"mt-2 2xl:mt-3 4xl:mt-[14px] 5xl:mt-4 6xl:mt-[21px] 6xl:mb-2 font-semibold text-[#434343] dark:text-gray-300 xxxsm:text-sm xsm:text-[15px] sm:text-[16px] 3xl:text-lg 4xl:text-[21px] 5xl:text-[25px] 6xl:text-[27px]",children:T("last updated")}
1),(0,M.jsx)("span",{className:"mt-2 2xl:mt-3 4xl:mt-[14px] 5xl:mt-4 6xl:mt-[21px] 6xl:mb-2 font-sans text-[#595959] dark:text-gray-400 xxxsm:text-sm xsm:text-[15px] sm:text-[16px] 3xl:text-lg 4xl:text-[21px] 5xl:text-[25px] 6xl:text-[27px]",children:null!==F&&void 0!==F&&F.addedDate?new Intl.DateTimeFormat("en-US",{month:"short",day:"2-digit",year:"numeric"}).format(new Date(null===F||void 0===F?void 0:F.addedDate)):T("no date found")})]})]})]}),(0,M.jsxs)("div",{className:"order-7 lg:hidden sm:order-6 xxxsm:mx-4 sm:mx-0 mt-10 5xl:mt-12 6xl:mt-14 flex flex-col xxxsm:gap-5 lg:gap-8 5xl:gap-10 6xl:gap-12",children:[(0,M.jsx)("h2",{className:"xxxsm:text-[18px] lg:text-[22px] font-bold dark:text-main-heading-white",children:T("bid information")}),(0,M.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,M.jsxs)("div",{className:"flex gap-4 justify-between border-t dark:border-light-border",children:[(0,M.jsxs)("h4",{className:"mt-2 font-semibold text-[#434343] dark:text-gray-300 xxxsm:text-sm xsm:text-[15px] sm:text-[16px]",children:[T("bid status"),":"]}),(0,M.jsx)("span",{className:"mt-2 flex gap-2 items-center",children:1==F.biddingVehicle?(0,M.jsx)(ge.ebF,{className:"text-green-600 border border-black dark:border-light-border rounded-full xxxsm:text-sm xsm:text-[15px] sm:text-[16px]"}):(0,M.jsx)(ge.ebF,{className:"text-red-900 border border-black dark:border-light-border rounded-full "})})]}),(0,M.jsxs)("div",{className:"flex gap-4 justify-between border-t dark:border-light-border",children:[(0,M.jsxs)("h4",{className:"mt-2 font-semibold text-[#434343] dark:text-gray-300 xxxsm:text-sm xsm:text-[15px] sm:text-[16px]",children:[T("expected bid"),":"]}),(0,M.jsxs)("div",{className:"mt-2 flex items-center gap-2 cursor-pointer dark:text-gray-400",children:[(0,M.jsxs)("span",{className:"xxxsm:text-sm xsm:text-[15px] sm:text-[16px]",children:["BHD:",F.expectedbids]}),(0,M.jsx)(Ce.tEG,{className:"xxxsm:text-sm xsm:text-[15px] sm:text-[16px]"})]})]}),(0,M.jsxs)("div",{className:"flex gap-4 justify-between border-t dark:border-light-border",children:[(0,M.jsxs)("h4",{className:"mt-2 font-semibold text-[#434343] dark:text-gray-300 xxxsm:text-sm xsm:text-[15px] sm:text-[16px]",children:[T("minimum bid"),":"]}),(0,M.jsxs)("div",{className:" mt-2 flex items-center gap-2 cursor-pointer dark:text-gray-400",children:[(0,M.jsxs)("span",{className:"xxxsm:text-sm xsm:text-[15px] sm:text-[16px]",children:["BHD:",F.minimumbids]}),(0,M.jsx)(Ce.tEG,{className:"xxxsm:text-sm xsm:text-[15px] sm:text-[16px]"})]})]}),(0,M.jsxs)("div",{className:" flex gap-4 justify-between border-t dark:border-light-border",children:[(0,M.jsxs)("h4",{className:"mt-2 font-semibold text-[#434343] dark:text-gray-300 xxxsm:text-sm xsm:text-[15px] sm:text-[16px]",children:[T("your current bid"),":"]}),(0,M.jsx)("div",{children:(0,M.jsxs)("span",{className:"mt-2 xxxsm:text-sm xsm:text-[15px] sm:text-[16px] dark:text-gray-400",children:["BHD:"," ",O.value?T("not bid yet"):O.value]})})]})]}),(0,M.jsxs)("div",{className:"flex flex-col gap-3 border-t border-b dark:border-light-border pb-3",children:[(0,M.jsx)("h1",{className:"xxxsm:text-base xsm:text-lg sm:text-xl mt-3 font-semibold dark:text-main-heading-white",children:T("your bid")}),(0,M.jsxs)("div",{className:" w-full flex xxxsm:flex-col xxxsm:gap-3 xsm:flex-row xsm:gap-0",children:[(0,M.jsxs)("div",{className:"flex items-center gap-2 w-full",children:[(0,M.jsx)("span",{className:"xxxsm:text-sm xsm:text-[15px] sm:text-[16px] dark:text-gray-300",children:"BHD"})," ",(0,M.jsx)("input",{type:"text",placeholder:T("enter a bidding"),className:"outline-none border border-neutral-400 dark:border-border-color dark:bg-input-bg dark:text-gray-200 xxxsm:w-[80%] xsm:w-full px-2 py-2 xxsm:py-[10px]  placeholder:xxxsm::text-sm xxxsm:text-sm placeholder:xsm:text-[15px] xsm:text-[15px]  focus:ring-1 focus:ring-blue-500 focus:border-blue-500 ".concat("ar"===P.language?"xxsm:pr-2 xsm:pr-3 xxxsm:rounded-md xsm:rounded-l-none  xsm:rounded-r-md":"xxsm:pl-2 xsm:pl-3 xxxsm:rounded-md xsm:rounded-r-none  xsm:rounded-l-md"),value:Y,onChange:e=>K(e.target.value)})]}),(0,M.jsx)("div",{className:"flex justify-center gap-3 cursor-pointer ".concat(Y<F.minimumbids?"cursor-not-allowed opacity-50":"cursor-pointer"),onClick:()=>{Y>=F.minimumbids&&G(_)},children:(0,M.jsxs)("span",{className:" bg-[#0173e9] text-[18px] text-white font-bold   py-2 px-5 flex  items-center justify-center gap-2  ".concat("ar"===P.language?"xxxsm:rounded-md xsm:rounded-r-none xsm:rounded-l-md":"xxxsm:rounded-md xsm:rounded-l-none xsm:rounded-r-md","\n                    ").concat(Y<F.minimumbids?"bg-gray-400 text-gray-200":"bg-[#0173e9] text-white","\n                    "),children:[(0,M.jsx)("h1",{className:"text-[15px]  text-nowrap",children:O.value?T("update bid"):T("bid now")}),(0,M.jsx)(ge.ndZ,{className:"text-lg ".concat("ar"===P.language?"rotate-180":"")})]})})]})]})]}),(0,M.jsxs)("div",{className:"xxxsm:mx-4 sm:mx-0 mt-10 5xl:mt-12 6xl:mt-14 flex flex-col xxxsm:order-8 sm:order-7 xxxsm:gap-5 lg:gap-8 5xl:gap-10 6xl:gap-12 ",children:[(0,M.jsx)("h2",{className:"xxxsm:text-[18px] lg:text-[22px] xl:text-2xl 3xl:text-[26px] 4xl:text-[29px] 5xl:text-[32px] 6xl:text-[35px] font-bold dark:text-main-heading-white",children:T("car features")}),(0,M.jsx)("div",{className:"gap-3   grid grid-cols-2 space-y-2 4xl:gap-y-5 5xl:gap-y-7 6xl:gap-y-9",children:null===F||void 0===F||null===(w=F.vehicleFeatures)||void 0===w?void 0:w.filter((e=>"yes"===e.value)).map(((e,t)=>(0,M.jsxs)("h1",{className:"flex gap-2",children:[le[e.feature.name],(0,M.jsx)("h2",{className:"text-[#373737] dark:text-gray-300 xxxsm:tracking-tighter xxsm:tracking-normal xxxsm:text-[14px] lg:text-[16
1px] 3xl:text-lg 4xl:text-xl 5xl:text-[23px] 6xl:text-[27px]",children:T("Features.".concat(e.feature.name))})]},t)))})]}),(0,M.jsxs)("div",{id:"section4",className:"mt-10 5xl:mt-12 6xl:mt-14 sm:order-9 lg:order-8 sm:flex flex-col gap-4 xxxsm:hidden ",children:[(0,M.jsx)("div",{className:"xxxsm:text-[18px] lg:text-[22px] xl:text-2xl 3xl:text-[26px] 4xl:text-[29px] 5xl:text-[32px] 6xl:text-[35px] font-bold dark:text-main-heading-white",children:T("description")}),(0,M.jsx)("div",{className:"xxxsm:text-sm lg:text-[15px] 3xl:text-[17px] 4xl:text-[19px] 5xl:text-[22px] 6xl:text-[25px] dark:text-gray-300",children:null!==F&&void 0!==F&&F.description?(be=F.description,be.split("\n").map(((e,t)=>(0,M.jsxs)("span",{children:[e,(0,M.jsx)("br",{})]},t)))):"No description available."}),(0,M.jsx)("div",{className:"xxxsm:text-sm lg:text-[15px] 3xl:text-[17px] 4xl:text-[19px] 5xl:text-[22px] 6xl:text-[25px] dark:text-gray-300",children:T("mention arabiawheel.com when calling seller to get a good deal")})]}),(0,M.jsxs)("div",{className:"xxxsm:pb-7 sm:pb-0 xxxsm:mx-4 sm:mx-0 xxxsm:flex flex-col xxxsm:order-8 sm:order-7 gap-4 mt-10  lg:hidden ",children:[(0,M.jsx)("div",{className:"xxxsm:text-[18px] flex justify-between items-center lg:text-2xl font-bold dark:text-main-heading-white",children:(0,M.jsxs)("div",{children:[" ",T("seller detail")]})}),(0,M.jsxs)("div",{className:"flex justify-between items-center",children:[(0,M.jsxs)("div",{className:"flex flex-col gap-3  w-[80%]",children:[(0,M.jsx)("span",{className:"flex items-center gap-1 xxxsm:text-sm dark:text-gray-300 ",children:(0,M.jsxs)("div",{dir:"ltr",className:"flex items-center gap-1",children:[null===F||void 0===F||null===(y=F.user)||void 0===y?void 0:y.username,(0,M.jsx)(Ce.enS,{color:"green"})]})}),(0,M.jsxs)("span",{className:" flex items-center gap-1 xxxsm:text-xs ",children:[(0,M.jsx)(Ce.eVO,{className:"text-gray-600 dark:text-gray-400 text-[13px]"}),(0,M.jsx)("span",{className:"text-[15px] text-[#373737] dark:text-gray-300 line-clamp-1",children:null===F||void 0===F||null===(j=F.user)||void 0===j?void 0:j.address})]}),(0,M.jsxs)("span",{className:" flex items-center gap-1 xxxsm:text-xs ",children:[(0,M.jsx)(a.dRU,{className:"text-gray-600 dark:text-gray-400 text-[13px]"}),(0,M.jsx)("span",{className:"text-[15px] text-[#373737] dark:text-gray-300 line-clamp-1",children:null===F||void 0===F||null===(N=F.user)||void 0===N?void 0:N.phoneNumber})]})]}),(0,M.jsx)("div",{className:" w-[20%] flex justify-end",children:(0,M.jsx)("img",{src:"".concat(null===F||void 0===F||null===(k=F.user)||void 0===k?void 0:k.profileimg),className:"w-[70px] h-16 rounded-full  ",loading:"lazy",alt:"profile"})})]})]})]})}),(0,M.jsxs)("div",{className:"xxxsm:hidden lg:w-[40%] xl:w-[37%]  lg:flex flex-col   gap-4 ",children:[(0,M.jsxs)("div",{className:"rounded-lg  bg-white dark:bg-dark-from shadow-md border border-[#E5E7EB] dark:border-light-border",children:[(0,M.jsxs)("div",{className:"flex justify-between  border-b dark:border-light-border p-3 4xl:p-4 6xl:p-5",children:[(0,M.jsxs)("h1",{className:"text-lg xl:text-xl 2xl:text-2xl 3xl:text-[26px] 4xl:text-[28px] 5xl:text-3xl 6xl:text-[33px] 6xl:py-2  font-bold dark:text-main-heading-white",children:[T("bid information"),(0,M.jsx)("hr",{className:"w-[42px] 2xl:w-[53px] 3xl:w-[57px] 4xl:w-[63px] 5xl:w-[70px] 6xl:w-[73px] h-[3px] 3xl:h-[4px] 4xl:h-[5px] rounded-md bg-[#0173e9]"})]}),(0,M.jsx)("span",{className:"text-[18px] font-semibold"})]}),(0,M.jsxs)("div",{className:"p-3 4xl:p-4 6xl:p-5 flex flex-col gap-3 2xl:gap-4 5xl:gap-[18px] 6xl:gap-7   border-b dark:border-light-border",children:[(0,M.jsxs)("div",{className:"flex gap-4 ",children:[(0,M.jsxs)("h4",{className:"text-[16px] lg:text-sm xl:text-base 2xl:text-[19px] 3xl:text-xl 4xl:text-[23px] 5xl:text-[25px] 6xl:text-[28px] text-neutral-600 dar
1k:text-gray-300 w-[40%]",children:[T("bid status"),":"]}),(0,M.jsx)("div",{className:"flex items-center gap-2 w-[60%]",children:1==F.biddingVehicle?(0,M.jsx)(ge.ebF,{className:"text-green-600 border border-black dark:border-border-color rounded-full lg:text-sm xl:text-base 2xl:text-[19px] 3xl:text-xl 4xl:text-[23px] 5xl:text-[25px] 6xl:text-[28px]"}):(0,M.jsx)(ge.ebF,{className:"text-red-900 border border-black dark:border-border-color rounded-full lg:text-sm xl:text-base 2xl:text-[19px] 3xl:text-xl 4xl:text-[23px] 5xl:text-[25px] 6xl:text-[28px]"})})]}),(0,M.jsxs)("div",{className:"flex gap-4",children:[(0,M.jsxs)("h4",{className:" text-[16px] lg:text-sm xl:text-base 2xl:text-[19px] 3xl:text-xl 4xl:text-[23px] 5xl:text-[25px] 6xl:text-[28px] text-neutral-600 dark:text-gray-300 w-[40%] ",children:[T("expected bid"),":"]}),(0,M.jsxs)("div",{dir:"ltr",className:"flex items-center  ".concat("ar"===P.language?"justify-end":"justify-normal","  gap-1 w-[60%] cursor-pointer  lg:text-sm xl:text-base 2xl:text-[19px] 3xl:text-xl 4xl:text-[23px] 5xl:text-[25px] 6xl:text-[28px] dark:text-main-heading-white"),children:[(0,M.jsxs)("span",{className:"font-semibold",children:["BHD:",F.expectedbids]}),(0,M.jsxs)("div",{className:"relative flex gap-1 items-center group overflow-visible",children:[(0,M.jsx)(Ce.tEG,{className:"cursor-pointer"}),(0,M.jsxs)("div",{className:"xxxsm:hidden md:block absolute ".concat(window.isArabic?"left-full ml-3":"right-full mr-2"," top-1/2 z-50 -translate-y-1/2  w-[260px] xl:w-[290px] 2xl:w-[300px] 3xl:w-[320px] 4xl:w-[360px] 5xl:w-[400px] 6xl:w-[430px] rounded-md bg-white dark:bg-input-bg py-3 px-4 text-xs text-gray-800 font-medium opacity-0 invisible transition-opacity duration-300 border dark:border-none shadow-lg group-hover:opacity-100 group-hover:visible"),style:{boxShadow:"0 4px 20px rgba(0, 0, 0, 0.1), 0 6px 30px rgba(0, 0, 0, 0.15)"},children:[(0,M.jsx)("span",{className:"absolute ".concat(window.isArabic?"left-[-7px] z-10":"right-[-6px] z-10"," top-1/2 h-3 w-3 -translate-y-1/2 rotate-45 bg-white dark:bg-input-bg")}),(0,M.jsxs)("div",{dir:window.directionTo,className:"p-1 flex flex-col gap-1",children:[(0,M.jsx)("div",{className:"flex  ",children:(0,M.jsx)("span",{className:"text-[#1e1f21] dark:text-main-heading-white text-[15px] xl:text-base 2xl:text-lg 3xl:text-xl 4xl:text-[21px] 5xl:text-[23px] 6xl:text-[25px] font-semibold",children:T("expected bid")})}),(0,M.jsx)("div",{className:"flex items-center gap-2 text-[#525355] dark:text-gray-300 text-[13px] xl:text-sm 2xl:text-[15px] 3xl:text-base 4xl:text-[17px] 5xl:text-[19px] 6xl:text-[21px] 5xl:leading-snug",children:(0,M.jsx)("span",{children:T("expected bid tooltip text")})})]})]})]})]})]}),(0,M.jsxs)("div",{className:"flex gap-4",children:[(0,M.jsxs)("h4",{className:"text-[16px] text-neutral-600 dar
1k:text-gray-300 w-[40%] lg:text-sm xl:text-base 2xl:text-[19px] 3xl:text-xl 4xl:text-[23px] 5xl:text-[25px] 6xl:text-[28px]",children:[T("minimum bid"),":"]}),(0,M.jsxs)("div",{dir:"ltr",className:"flex items-center ".concat("ar"===P.language?"justify-end":"justify-normal"," gap-1 w-[60%] cursor-pointer lg:text-sm xl:text-base 2xl:text-[19px] 3xl:text-xl 4xl:text-[23px] 5xl:text-[25px] 6xl:text-[28px] dark:text-main-heading-white"),children:[(0,M.jsxs)("span",{className:"font-semibold",children:["BHD:",F.minimumbids]}),(0,M.jsxs)("div",{className:"relative flex gap-1 items-center group overflow-visible",children:[(0,M.jsx)(Ce.tEG,{className:"cursor-pointer"}),(0,M.jsxs)("div",{className:"xxxsm:hidden md:block absolute ".concat(window.isArabic?"left-full ml-3":"right-full mr-2"," top-1/2 z-50 -translate-y-1/2  w-[260px] xl:w-[290px] 2xl:w-[300px] 3xl:w-[320px] 4xl:w-[360px] 5xl:w-[400px] 6xl:w-[430px] rounded-md bg-white dark:bg-input-bg py-3 px-4 text-xs text-gray-800 font-medium opacity-0 invisible transition-opacity duration-300 border dark:border-none shadow-lg group-hover:opacity-100 group-hover:visible "),style:{boxShadow:"0 4px 20px rgba(0, 0, 0, 0.1), 0 6px 30px rgba(0, 0, 0, 0.15)"},children:[(0,M.jsx)("span",{className:"absolute ".concat(window.isArabic?"left-[-7px] z-10":"right-[-6px] z-10"," top-1/2 h-3 w-3 -translate-y-1/2 rotate-45 bg-white dark:bg-input-bg")}),(0,M.jsxs)("div",{dir:window.directionTo,className:"p-1 flex flex-col gap-1",children:[(0,M.jsx)("div",{className:"flex  ",children:(0,M.jsx)("span",{className:"text-[#1e1f21] dark:text-main-heading-white text-[15px] xl:text-base 2xl:text-lg 3xl:text-xl 4xl:text-[21px] 5xl:text-[23px] 6xl:text-[25px] font-semibold",children:T("minimum bid")})}),(0,M.jsx)("div",{className:"flex items-center gap-2 text-[#525355] dark:text-gray-300 text-[13px] xl:text-sm 2xl:text-[15px] 3xl:text-base 4xl:text-[17px] 5xl:text-[19px] 6xl:text-[21px] 5xl:leading-snug",children:(0,M.jsx)("span",{children:T("mini bid tooltip text")})})]})]})]})]})]}),(0,M.jsxs)("div",{className:"flex gap-4",children:[(0,M.jsxs)("h4",{className:"text-[16px] text-neutral-600 dar
1k:text-gray-300 w-[40%] lg:text-sm  lg:tracking-tighter xl:text-base xl:tracking-normal 2xl:text-[19px] 3xl:text-xl 4xl:text-[23px] 5xl:text-[25px] 6xl:text-[28px]",children:[T("your current bid"),":"]}),(0,M.jsx)("div",{className:" w-[60%] ",children:(0,M.jsxs)("div",{children:[(0,M.jsxs)("span",{className:"font-semibold lg:text-sm xl:text-base 2xl:text-[19px] 3xl:text-xl 4xl:text-[23px] 5xl:text-[25px] 6xl:text-[28px] dark:text-main-heading-white",children:["BHD:"," ",O.value?O.value:T("not bid yet")]}),!(O.value&&O.value>=F.expectedbids)&&(0,M.jsx)("span",{className:"flex dark:text-main-heading-white",children:(0,M.jsx)("h3",{className:"text-[14px] lg:text-xs xl:text-sm 2xl:text-base 3xl:text-[17px] 4xl:text-lg 5xl:text-xl 6xl:text-[23px] font-medium",children:T("seller reserve not yet met")})})]})})]})]}),(0,M.jsxs)("div",{className:"p-3 4xl:p-4 6xl:p-5 flex flex-col gap-3 5xl:gap-4 6xl:gap-5 border-b dark:border-light-border",children:[(0,M.jsx)("h1",{className:"text-[16px] lg:text-sm xl:text-base 2xl:text-[19px] 3xl:text-xl 4xl:text-[23px] 5xl:text-[25px] 6xl:text-[28px] text-neutral-600 dar
1k:text-gray-300 ",children:T("your bid")}),(0,M.jsx)("div",{className:"flex flex-col gap-3",children:(0,M.jsxs)("div",{className:"flex items-center gap-2 h-full",children:[(0,M.jsx)("span",{className:"text-sm xl:text-base 2xl:text-[19px] 3xl:text-xl 4xl:text-[23px] 5xl:text-[25px] 6xl:text-[28px] dark:text-main-heading-white",children:"BHD"}),(0,M.jsx)("input",{type:"text",placeholder:T("enter a bidding"),className:" outline-none border border-neutral-400 dark:border-border-color dark:bg-input-bg dark:text-gray-200 lg:w-[80%] px-2 lg:pl-3 5xl:pl-4 6xl:pl-5 lg:py-2 xl:py-[10px] 5xl:py-[14px] 6xl:py-[18px] placeholder:lg:text-xs lg:text-xs placeholder:xl:text-sm xl:text-sm placeholder:2xl:text-base 2xl:text-base placeholder:3xl:text-lg 3xl:text-lg placeholder:4xl:text-xl 4xl:text-xl placeholder:5xl:text-[22px] 5xl:text-[22px] placeholder:6xl:text-[26px] 6xl:text-[26px] rounded-md focus:ring-1 focus:ring-blue-500 focus:border-blue-500",value:Y,onChange:e=>K(e.target.value)})]})}),(0,M.jsx)("div",{className:"flex justify-center pb-2 cursor-pointer ".concat(Y<F.minimumbids?"cursor-not-allowed opacity-50":"cursor-pointer"),onClick:()=>{Y>=F.minimumbids&&G(_)},children:(0,M.jsxs)("span",{className:"border bg-[#0173e9] text-[18px] text-white font-bold w-[90%] rounded-md py-2 3xl:py-[10px] 5xl:py-[14px] 6xl:py-[18px] flex  items-center justify-center gap-3 5xl:gap-4 6xl:gap-5\n                    ".concat(Y<F.minimumbids?"bg-gray-400 text-gray-200":"bg-[#0173e9] text-white","\n                    "),children:[(0,M.jsx)("h1",{className:" flex justify-end text-sm xl:text-base 2xl:text-xl 3xl:text-[22px] 4xl:text-2xl 5xl:text-[30px] 6xl:text-[37px]",children:O.value?T("update bid"):T("bid now")}),(0,M.jsx)(ge.ndZ,{className:" lg:text-base xl:text-lg 2xl:text-xl 3xl:text-[22px] 4xl:text-2xl 5xl:text-[30px] 6xl:text-[37px] ".concat("ar"===P.language?"rotate-180":"")})]})})]}),(0,M.jsx)("div",{className:"text-center py-2 xl:py-3 2xl:py-4 4xl:py-5 5xl:py-7",children:(0,M.jsxs)("h1",{className:"text-[14px] lg:text-[10px] xl:text-[13px] 2xl:text-base 3xl:text-lg 4xl:text-xl 5xl:text-[23px] 6xl:text-[26px] font-medium tracking-tight text-[#616263] dark:text-gray-400",children:[T("all bids are legally bindings and all sale are final."),(0,M.jsx)("span",{className:"underline font-bold cursor-pointer text-[#387df4]",children:T("learn more")})," "]})})]}),(0,M.jsxs)("div",{className:" border border-[#E5E7EB] dark:border-light-border shadow-md rounded-md bg-[#F5F8FD] dark:bg-dark-from px-3 4xl:px-4 6xl:px-5  py-3 4xl:py-4 6xl:py-5 flex flex-col gap-4 ",children:[(0,M.jsxs)("div",{className:"flex items-center ",children:[(0,M.jsxs)("h1",{className:"text-[15px] lg:text-sm xl:text-base 2xl:text-[19px] 3xl:text-xl 4xl:text-[23px] 5xl:text-[27px] 6xl:text-3xl  text-neutral-600 dar
1k:text-gray-300  w-[80%]",children:[T("do you want to buy this vehicle now for")," ",(0,M.jsxs)("span",{className:"font-bold",children:[F.expectedbids,"BHD "]}),T("without any auction?")]}),(0,M.jsx)("div",{className:"w-[20%]  flex justify-center",children:(0,M.jsx)("img",{src:"https://cdn-icons-png.flaticon.com/512/411/411705.png",loading:"lazy",alt:"tag",className:"w-10 lg:w-8 xl:w-10 2xl:w-11 3xl:w-12 4xl:w-14 5xl:w-16 6xl:w-[70px]"})})]}),(0,M.jsx)("div",{className:"flex gap-7",children:(0,M.jsx)("span",{className:" lg:text-xs xl:text-sm 2xl:text-base 3xl:text-lg 4xl:text-[22px] 5xl:text-2xl 6xl:text-[27px] bg-[#0173e9] hover:bg-[#2a73f0] lg:px-3 lg:py-[6px] 3xl:py-[7px] 4xl:py-[10px] 4xl:px-[14px] 5xl:px-[16px] 5xl:py-[12px] 6xl:px-[18px] 6xl:py-[14px] font-bold text-white rounded-md cursor-pointer",onClick:()=>{r.oR.success("Your Request Sent to User Successfully")},children:T("buy it now")})})]}),(0,M.jsx)(M.Fragment,{children:(0,M.jsxs)("div",{className:"flex flex-col bg-white dark:bg-dark-from items-center sm:border sm:border-[#E5E7EB] dark:sm:border-light-border shadow-md rounded-md",children:[(0,M.jsxs)("div",{className:"py-5 3xl:py-6 4xl:py-7 5xl:py-8 6xl:py-10  flex flex-col gap-2 3xl:gap-[10px] 4xl:gap-3 5xl:gap-4 6xl:gap-5 border-b dark:border-light-border items-center",children:[(0,M.jsxs)("div",{className:"border flex gap-1 text-[#CFA207] text-lg tracking-widest  border-t-[#CFA207] border-b-[#CFA207] border-r-0 border-l-0",children:[(0,M.jsx)(a.veT,{className:"translate-y-[5px] text-[8px] 4xl:text-[10px] 5xl:text-xs 6xl:text-sm"}),"\xa0"," ",(0,M.jsx)("span",{className:"lg:text-base xl:text-lg 2xl:text-xl 3xl:text-2xl 4xl:text-[26px] 5xl:text-[30px] 6xl:text-[34px]",children:T("trusted sellers")})," ","\xa0",(0,M.jsx)(a.veT,{className:"translate-y-[5px] text-[8px] 4xl:text-[10px] 5xl:text-xs 6xl:text-sm"})]}),(0,M.jsx)("img",{src:"".concat(null===F||void 0===F||null===(C=F.user)||void 0===C?void 0:C.profileimg),className:"rounded-full  lg:w-20 lg:h-20 xl:w-24 xl:h-24 2xl:w-28 2xl:h-28 3xl:w-32 3xl:h-32 4xl:w-36 4xl:h-36 5xl:w-40 5xl:h-40 6xl:w-44 6xl:h-44",loading:"lazy",alt:"Profile"})]}),(0,M.jsxs)("div",{className:"text-center flex flex-col gap-2 4xl:gap-3 6xl:gap-4  items-center  w-[90%] 4xl:py-3 6xl:py-4",children:[(0,M.jsxs)("span",{className:"flex items-center pt-2 4x:pt-4 5xl:pt-6 gap-1 w-full ",children:[(0,M.jsxs)("span",{className:"font-semibold lg:text-[15px] xl:text-[16px] 2xl:text-lg 3xl:text-xl 4xl:text-[23px] 5xl:text-[28px] 6xl:text-3xl dark:text-main-heading-white ",children:[T("user"),":"]}),(0,M.jsx)("span",{className:"lg:text-sm xl:text-[15px] 2xl:text-[17px] 3xl:text-[19px] 4xl:text-[22px] 5xl:text-[27px] 6xl:text-[29px] dark:text-gray-300 ",children:null===F||void 0===F||null===(D=F.user)||void 0===D?void 0:D.username}),(0,M.jsx)(Ce.enS,{color:"green",className:"3xl:text-[19px] 4xl:text-[22px] 5xl:text-[27px] 6xl:text-[29px]"})]}),(0,M.jsxs)("span",{className:"flex  w-full",children:[(0,M.jsxs)("span",{className:"font-semibold lg:text-[15px] xl:text-[16px] 2xl:text-lg  3xl:text-xl 4xl:text-[23px] 5xl:text-[28px] 6xl:text-3xl dark:text-main-heading-white",children:[T("address"),":"]}),(0,M.jsx)("span",{className:"lg:text-sm xl:text-[15px] 2xl:text-[17px] 3xl:text-[19px] 4xl:text-[22px] 5xl:text-[27px] 6xl:text-[29px] text-left dark:text-gray-300  ",children:null===F||void 0===F||null===(A=F.user)||void 0===A?void 0:A.address})]}),(0,M.jsxs)("span",{className:"flex items-center xl:gap-1 w-full mb-3",children:[(0,M.jsxs)("span",{className:"font-semibold lg:text-[15px] xl:text-[16px] 2xl:text-lg  3xl:text-xl 4xl:text-[23px] 5xl:text-[28px] 6xl:text-3xl dark:text-main-heading-white",children:[T("phone"),":"]}),(0,M.jsx)("span",{className:"lg:text-sm xl:text-[15px] lg:tracking-tighter xl:tracking-normal 2xl:text-[17px] 3xl:text-[19px] 4xl:text-[22px] 5xl:text-[27px] 6xl:text-[29px] dark:text-gray-300",children:null===F||void 0===F||null===(S=F.user)||void 0===S?void 0:S.phoneNumber})]})]})]})})]})]}),(0,M.jsxs)("div",{id:"section5",className:"mt-9 5xl:mt-10 pb-12 xxxsm:w-[95%] sm:w-full mx-auto flex flex-col gap-4 5xl:gap-5 6xl:gap-7 ",children:[(0,M.jsx)("h1",{className:"xxxsm:text-[18px] lg:text-[22px] xl:text-2xl 3xl:text-[27px] 4xl
1:text-3xl 5xl:text-[33px] 6xl:text-[36px] font-bold text-[#373737] dark:text-main-heading-white",children:T("similar ads")}),(null===I||void 0===I?void 0:I.length)>0?(0,M.jsx)("div",{ref:ue,className:"flex gap-4 xl:gap-3 overflow-x-auto overflow-y-hidden scroll-smooth hide-scrollbar",style:{WebkitOverflowScrolling:"touch",scrollBehavior:"smooth",msOverflowStyle:"none",scrollbarWidth:"none"},children:I.filter((e=>e.vehicleid!==(null===F||void 0===F?void 0:F.id))).map(((e,t)=>{var x,l,a,s,r,i,d,n,o;return(0,M.jsx)(Ae.N_,{to:"".concat("new-car"===e.vehicleCategory?T("routes.NewCar","/new-car"):T("routes.UsedCar","/used-car"),"/").concat(null===(x=e.makeName)||void 0===x?void 0:x.toLowerCase(),"/").concat(null===(l=e.modelName)||void 0===l?void 0:l.toLowerCase(),"/").concat(e.year,"/").concat("new-car"===e.category?"new-car":"used-car","-").concat(null===(a=e.makeName)||void 0===a?void 0:a.toLowerCase(),"-").concat(null===(s=e.modelName)||void 0===s?void 0:s.toLowerCase(),"-").concat(e.year,"-").concat(null===(r=e.cityName)||void 0===r?void 0:r.trim().toLowerCase().replace(/\s+/g,"-"),"-").concat(e.vehicleid),className:"shadow-sm  mt-3 xsm:mt-0 hover:shadow-lg transition mb-3",children:(0,M.jsxs)("div",{className:"bg-white dark:bg-dark-from border dark:border-light-border flex flex-col  shadow-lg rounded-lg xxxsm:w-[235px] sm:w-[245px] md:w-[255px] 2xl:w-[300px] 4xl:w-[340px] 5xl:w-[370px] 6xl:w-[420px] xxxsm:h-[280px] sm:h-[300px] md:h-[310px] lg:h-[320px] 3xl:h-[350px] 4xl:h-[390px] 5xl:h-[420px] 6xl:h-[460px]",children:[(0,M.jsx)("div",{className:" bg-gray-600 rounded-t-lg relative xxxsm:h-[210px] sm:h-[240px] 5xl:h-[260px] 6xl:h-[280px] overflow-hidden items-center flex justify-center",children:(0,M.jsx)(Ke.LazyLoadImage,{loading:"lazy",className:"",src:null!==(i=e.images)&&void 0!==i&&i[0]?null===(d=e.images)||void 0===d?void 0:d[0]:"https://res.cloudinary.com/dr3ie9gpz/image/upload/v1736513089/no-photo-available-icon-default-image-symbol-vector-40343347_jcz3bo.jpg",alt:"
1Vehicle"},null===e||void 0===e?void 0:e.vehicleid)}),(0,M.jsxs)("div",{className:"".concat(window.isArabic?"text-right":"text-left "," w-[90%] flex flex-col gap-2 3xl:gap-[10px] 5xl:gap-3 6xl:gap-4 mx-auto pt-2 4xl:pt-3 pb-2 "),children:[(0,M.jsx)("p",{className:"xxxsm:text-xs xxsm:text-xs truncate xsm:text-sm 3xl:text-[15px]  4xl:text-base 5xl:text-lg 6xl:text-xl text-[#061D34] dark:text-main-heading-white hover:text-[#39B3D7] font-semibold",children:(0,M.jsxs)("abbr",{title:"".concat(T("Make.".concat(e.makeName))," ").concat(T("Model.".concat(e.modelName))," ").concat(e.year," ").concat(T("for sale")),className:"border-none no-underline truncate",children:[T("Make.".concat(e.makeName))," ",T("Model.".concat(e.modelName))," ",e.year]})}),(0,M.jsxs)("p",{className:"mb-1 xxxsm:text-xs xsm:text-sm md:text-xs lg:text-sm text-[#061D34] dark:text-main-heading-white flex flex-col gap-1 justify-between",children:[null!==e&&void 0!==e&&e.price?(0,M.jsx)("span",{className:"".concat(null!==e&&void 0!==e&&e.price?"block":"hidden"," text-sm xsm:text-lg sm:text-base md:text-lg lg:text-xl xl:text-xl 4xl:text-[22px] 5xl:text-2xl 6xl:text-[28px] font-bold"),children:(0,M.jsxs)("span",{children:["  BHD"," ",isNaN(Number(null===e||void 0===e?void 0:e.price))?"N/A":Number(null===e||void 0===e?void 0:e.price).toLocaleString("en-US")]})}):"",(0,M.jsx)("div",{className:"flex gap-2 border-b-2 py-1  ",children:(0,M.jsx)("span",{className:"items-center text-[#061D34] dark:text-main-heading-white font-medium flex gap-1 3xl:text-base 4xl:text-[17px] 5xl:text-lg 6xl:text-xl",children:T("City.".concat(e.cityName))})}),(0,M.jsxs)("div",{className:"flex gap-2 pt-1 3xl:pt-2 4xl:pt-3 3xl:pb-1 5xl:pt-4 5xl:pb-2 6xl:pt-5 6xl:pb-3",children:[(0,M.jsx)("div",{className:"flex gap-2 ",children:(0,M.jsxs)("span",{className:"items-center text-[#061D34] dark:text-main-heading-white font-medium flex gap-1 4xl:text-base 5xl:text-lg 6xl:text-xl",children:[(0,M.jsx)(Ye.wQ1,{className:"text-lg 4xl:text-2xl 5xl:text-[29px] 6xl:text-[32px] text-[#0173E9]"}),e.year]})}),(0,M.jsx)("div",{className:"flex gap-2 ",children:"used-car"==(null===e||void 0===e?void 0:e.vehicleCategory)?(0,M.jsxs)("span",{className:"items-center text-[#061D34] dark:text-main-heading-white font-medium flex gap-1 4xl:text-base 5xl:text-lg 6xl:text-xl",children:[(0,M.jsx)(c.JYr,{className:"text-lg 4xl:text-2xl 5xl:text-[29px] 6xl:text-[32px] text-[#0173E9]"}),null===e||void 0===e||null===(n=e.mileage)||void 0===n?void 0:n.toLocaleString(),"km"]}):(0,M.jsxs)("span",{className:"items-center text-[#061D34] dark:text-main-heading-white font-medium flex gap-1 4xl:text-base 5xl:text-lg 6xl:text-xl",children:[(0,M.jsx)(c.JYr,{className:"text-lg 4xl:text-2xl 5xl:text-[29px] 6xl:text-[32px] text-[#0173E9]"}),null===e||void 0===e||null===(o=e.displacementcc)||void 0===o?void 0:o.toLocaleString(),"cc"]})}),(0,M.jsx)("div",{className:"flex gap-2 ",children:(0,M.jsxs)("span",{className:"items-center text-[#061D34] dark:text-main-heading-white font-medium flex gap-1 4xl:text-base 5xl:text-lg 6xl:text-xl",children:[(0,M.jsx)(Le.A_5,{className:"text-base 4xl:text-[23px] 5xl:text-[28px] 6xl:text-[31px] text-[#0173E9]"}),T("Fuel.".concat(e.fuelTypeName))]})})]})]})]})]})},t)}))}):(0,M.jsx)("div",{className:"w-full h-auto   flex items-center justify-center  p-4  xxxsm:h-[275px] sm:h-[280px]",children:(0,M.jsxs)("p",{className:"text-[#2B4D78] dark:text-main-heading-white xxxsm:text-sm xxsm:text-base xsm:text-lg whitespace-nowrap",children:[(0,M.jsx)(Ue.Mwp,{className:"m-auto mb-3 xxxsm:text-[40px] xxsm:text-[45px] xsm:text-[50px]  md:text-[55px]"}),T("No similar ads found.")]})})]})]})]});var be};var $e=x(31899),Je=x.n($e),Xe=x(53711),Ze=x(39902);x(25015);const Qe=()=>{const e=localStorage.getItem("automotors__UserData"),{t:t,i18n:x}=(0,p.Bd)(),n=(0,u.Zp)(),[c,h]=(0,l.useState)({fullName:"",username:"",email:"",gender:"",country:"",id:null,city:{id:null},dateOfBirth:null,phoneNumber:"",password:"",profileimg:"",userType:"",zipCode:""}),[g,f]=(0,l.useState)(!0),[v,b]=(0,l.useState)(null),w=(0,i.d4)((e=>e.auth.turno)),[y,j]=(0,l.useState)(""),N=((e,t)=>{const x=[];for(let l=e;l<=t;l++)x.push(l);return x})(1990,(0,Xe.C)(new Date)+1),k=["January","February","March","April","May","June","July","August","September","October","November","December"];(0,l.useEffect)((()=>{(async()=>{try{const f=localStorage.getItem("automotors__UserData");if(f){const v=(0,d.s)(f).id,b=await s.A.get("".concat("https://www.arabiawheel.com/automotor","/users/").concat(v));var e,t,x,l,a,r,i,n,o,c,p,m,u,g;if(b.data)h({fullName:null!==(e=b.data.fullName)&&void 0!==e?e:"",username:null!==(t=b.data.username)&&void 0!==t?t:"",email:null!==(x=b.data.email)&&void 0!==x?x:"",gender:null!==(l=b.data.gender)&&void 0!==l?l:"",city:{id:null!==(a=null===b||void 0===b||null===(r=b.data)||void 0===r||null===(i=r.city)||void 0===i?void 0:i.id)&&void 0!==a?a:null},dateOfBirth:null!==(n=b.data.dateOfBirth)&&void 0!==n?n:null,phoneNumber:null!==(o=b.data.phoneNumber)&&void 0!==o?o:"",id:null!==(c=b.data.id)&&void 0!==c?c:null,password:null!==(p=b.data.password)&&void 0!==p?p:"",userType:null!==(m=b.data.userType)&&void 0!==m?m:"",zipCode:null!==(u=b.data.zipCode)&&void 0!==u?u:""}),j(b.data.dateOfBirth?new Date(b.data.dateOfBirth):null),F(null!==(g=b.data.profileimg)&&void 0!==g?g:null)}}catch(v){b(v.message)}finally{f(!1)}})()}),[]);const C=e=>{h({...c,[e.target.name]:e.target.value})},[D,A]=(0,l.useState)(""),[S,B]=(0,l.useState)("");(0,l.useEffect)((()=>{const e=localStorage.getItem("automotors__username");A(e||"");const t=localStorage.getItem("automotors__email");B(t||"")}),[w]);const[z,F]=(0,l.useState)(null);return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(m.mg,{children:[(0,M.jsx)("title",{children:t("dealerProfileTitle")}),(0,M.jsx)("meta",{name:"description",content:t("dealerProfileDescription")}),(0,M.jsx)("meta",{name:"keywords",content:t("dealerProfileKeywords")}),(0,M.jsx)("meta",{name:"robots",content:"index, follow"}),(0,M.jsx)("meta",{name:"author",content:"Arabiawheel Team"}),(0,M.jsx)("meta",{name:"publisher",content:"Arabiawheel"}),(0,M.jsx)("link",{rel:"canonical",href:"http://localhost:3000/"}),(0,M.jsx)("meta",{name:"lang",content:x.language})]}),(0,M.jsx)("div",{className:" min-h-[99vh]   pb-10 pt-2",children:(0,M.jsx)("div",{className:"md:container mx-auto flex justify-center ",children:(0,M.jsxs)("div",{className:"border border-[#e6e6e6] dark:border-light-border xxxsm:w-[95%] md:w-full   min-h-[99vh] xxxsm:p-3 md:p-7 bg-white dark:bg-dark-from xxxsm:shadow-md md:shadow-none ",children:[(0,M.jsxs)("div",{className:"border-b dark:border-light-border",children:[(0,M.jsxs)("div",{className:"flex md:justify-between xxxsm:justify-end ",children:[(0,M.jsx)("div",{className:"text-[#333333] dark:text-main-heading-white xxxsm:text-[16
1px] md:text-[20px] lg:text-[24px] 2xl:text-[26px] 3xl:text-[29px] 4xl:text-[34px] 5xl:text-[38px] 6xl:text-[44px] font-normal xxxsm:hidden md:flex ",children:t("my profile")}),(0,M.jsx)("div",{className:"flex gap-1 cursor-pointer text-[#518ecb] text-[12px] 2xl:text-[13px] 3xl:text-[15px] 4xl:text-lg 5xl:text-xl 6xl:text-2xl",children:(0,M.jsxs)("div",{className:"flex items-center  hover:text-[#24527C]",onClick:()=>n("".concat(t("routes.DealerDashboard","/dealer/dashboard"))),children:[(0,M.jsx)(Ce.Ztw,{className:" text-lg 2xl:text-xl 2xl:translate-y-[-1px] 3xl:text-2xl 4xl:text-[27px] 4xl:translate-y-[-2px] 5xl:text-3xl 6xl:text-[34px]  ".concat(window.isArabic?"rotate-180":"none")}),t("back to dashboard")]})})]}),(0,M.jsx)("div",{className:"xxxsm:flex xxxsm:justify-center lg:justify-normal xxxsm:w-full xxxsm:ml-0 xxxsm:mb-3 lg:w-[80%]  md:mb-3 ".concat(window.isArabic?"md:mr-auto ":"md:ml-auto","  "),children:(0,M.jsxs)("label",{htmlFor:"image-upload",className:"cursor-pointer relative",children:[z?(0,M.jsx)("img",{loading:"lazy",src:z,alt:"Profile",className:"w-[90px] h-[90px] 2xl:w-[105px] 2xl:h-[105px] 3xl:w-[115px] 3xl:h-[115px] 4xl:w-[125px] 4xl:h-[125px] 5xl:w-[140px] 5xl:h-[140px] 6xl:w-[165px] 6xl:h-[165px] object-cover rounded-full border border-[#CBD5DC]"}):(0,M.jsx)(a.NBi,{className:"text-[#CBD5DC] border border-[#CBD5DC]  rounded-full text-[90px] 2xl:text-[105px] 3xl:text-[115px] 4xl:text-[125px] 5xl:text-[140px] 6xl:text-[165px]"}),(0,M.jsx)("input",{type:"file",id:"image-upload",accept:"image/*",onChange:e=>{const t=e.target.files[0];if(t){const e=URL.createObjectURL(t);F(e)}},className:"hidden"})]})})]}),(0,M.jsx)("div",{className:"border-b dark:border-light-border ",children:(0,M.jsxs)("div",{className:"xxxsm:w-full md:w-[90%] lg:w-[80%] xxxsm:ml-0  md:ml-auto mt-4 flex flex-col gap-4 5xl:gap-5 6xl:gap-6 mb-3 2xl:py-2 4xl:py-3 5xl:py-4 6xl:py-6 ",children:[(0,M.jsxs)("div",{className:"flex  xxxsm:flex-col xxxsm:gap-2 md:flex-row md:gap-4 md:items-center ",children:[(0,M.jsx)("label",{htmlFor:"",className:" flex md:justify-end xxxsm:w-full md:w-[20%]  text-[16px] xxxsm:text-sm xxsm:text-[16px] sm:text-[17px] 2xl:text-lg 4xl:text-[22px] 5xl:text-[27px] 6xl:text-3xl  text-[#434343] dark:text-main-heading-white font-medium",children:t("full name")}
1),(0,M.jsx)("div",{className:"xxxsm:w-full md:w-[80%] ",children:(0,M.jsx)("input",{type:"text",name:"fullName",value:c.fullName,onChange:C,placeholder:t("arabiawheel"),className:"outline-none border placeholder-[#434343] border-[#e6e6e6] dark:border-border-color dark:bg-input-bg dark:text-main-heading-white dark:placeholder-main-heading-white text-[14px] xxxsm:w-full md:w-[353px]   p-[13px] 2xl:w-[375px] 2xl:p-[14px]  placeholder:2xl:text-base 4xl:w-[440px] 4xl:p-[16px] placeholder:4xl:text-lg  5xl:w-[520px] 5xl:p-[20px] placeholder:5xl:text-xl 6xl:w-[630px] 6xl:p-[24px] placeholder:6xl:text-2xl 2xl:text-base 4xl:text-lg 5xl:text-xl 6xl:text-2xl rounded-md "})})]}),(0,M.jsxs)("div",{className:"flex  xxxsm:flex-col xxxsm:gap-2 md:flex-row md:gap-4 md:items-center ",children:[(0,M.jsx)("label",{htmlFor:"",className:" flex md:justify-end xxxsm:w-full md:w-[20%]  text-[16px] xxxsm:text-sm xxsm:text-[16px] sm:text-[17px] 2xl:text-lg 4xl:text-[22px] 5xl:text-[27px] 6xl:text-3xl text-[#434343] dark:text-main-heading-white font-medium",children:t("gender")}),(0,M.jsxs)("div",{className:"relative xxxsm:w-full md:w-auto",children:[(0,M.jsxs)("select",{name:"gender",value:c.gender,onChange:C,id:"gender",class:"outline-none border appearance-none  placeholder-[#434343] border-[#e6e6e6] text-[14px] xxxsm:w-full md:w-[353px] p-[13px] rounded-md 2xl:w-[375px] 2xl:p-[15px] 2xl:text-base 4xl:w-[440px] 4xl:p-[16px] 4xl:text-lg 5xl:w-[520px] 5xl:p-[18px] 5xl:text-xl 6xl:w-[630px] 6xl:p-[20px] 6xl:text-2xl dark:border-border-color dark:bg-input-bg dark:text-main-heading-white dark:placeholder-main-heading-white ",children:[(0,M.jsx)("option",{value:"",disabled:!0,children:t("select gender")}),(0,M.jsx)("option",{value:"Male",selected:!0,children:t("male")}),(0,M.jsx)("option",{value:"Female",children:t("female")})]}),(0,M.jsx)("div",{className:"pointer-events-none absolute inset-y-0 flex items-center   ".concat("ar"===x.language?"left-3":"right-3"),children:(0,M.jsx)("span",{className:"text-gray-500",children:(0,M.jsx)(o.q0c,{color:"#757575",className:" xxxsm:text-[25px] xsm:text-[28px] lg:text-[30px] 2xl:text-[32px] 3xl:text-[35px] 4xl:text-[37px] 5xl:text-[40px] 6xl:text-[44px]"})})})]})]}),(0,M.jsxs)("div",{className:"flex  xxxsm:flex-col xxxsm:gap-2 md:flex-row md:gap-4 md:items-center ",children:[(0,M.jsx)("label",{htmlFor:"",className:" flex md:justify-end xxxsm:w-full md:w-[20%]  text-[16px] xxxsm:text-sm xxsm:text-[16px] sm:text-[17px] 2xl:text-lg 4xl:text-[22px] 5xl:text-[27px] 6xl:text-3xl  text-[#434343] dark:text-main-heading-white font-medium",children:t("date of birth")}),(0,M.jsx)("div",{className:"xxxsm:w-full md:w-[80%]  xxxsm:border xxxsm:border-[#e6e6e6] xxxsm:rounded-md md:border-none md:rounded-none ",children:(0,M.jsx)(Je(),{selected:y,placeholderText:"dd-MM-yyyy",dateFormat:"dd-MM-yyyy",onChange:e=>j(e),renderCustomHeader:e=>{let{date:t,changeYear:x,changeMonth:l,decreaseMonth:a,increaseMonth:s,prevMonthButtonDisabled:r,nextMonthButtonDisabled:i}=e;return(0,M.jsxs)("div",{className:"flex justify-between items-center px-2 py-4 m-1 bg-[#1B5EB0] rounded-md ",children:[(0,M.jsx)("button",{className:"bg-white hover:text-red-500 w-4 h-4 rounded-full",onClick:a,disabled:r,children:(0,M.jsx)(ge.Y4p,{})}),(0,M.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,M.jsx)("select",{value:(0,Xe.C)(t),onChange:e=>{let{target:{value:t}}=e;return x(t)},className:"p-2 rounded border border-gray-300",children:N.map((e=>(0,M.jsx)("option",{value:e,children:e},e)))}),(0,M.jsx)("select",{value:k[(0,Ze.t)(t)],onChange:e=>{let{target:{value:t}}=e;return l(k.indexOf(t))},className:"p-2 rounded border border-gray-300",children:k.map((e=>(0,M.jsx)("option",{value:e,children:e},e)))})]}),(0,M.jsx)("button",{className:"w-4 h-4 rounded-full bg-white hover:text-red-400 flex justify-center items-center ",onClick:s,disabled:i,children:(0,M.jsx)(ge.Mud,{})})]})},className:"outline-none md:border md:border-[#e6e6e6]   placeholder-[#434343] text-[14px] xxxsm:w-full md:w-[353px] p-[13px] md:rounded-md 2xl:w-[375px] 2xl:p-[14px]  placeholder:2xl:text-base 4xl:w-[440px] 4xl:p-[16px] placeholder:4xl:text-lg  5xl:w-[520px] 5xl:p-[20px] placeholder:5xl:text-xl 6xl:w-[630px] 6xl:p-[24px] placeholder:6xl:text-2xl 2xl:text-base 4xl:text-lg 5xl:text-xl 6xl:text-2xl dark:border-border-color dark:bg-input-bg dark:text-main-heading-white dark:placeholder-main-heading-white"})})]}),(0,M.jsxs)("div",{className:"flex  xxxsm:flex-col xxxsm:gap-2 md:flex-row md:gap-4 md:items-center ",children:[(0,M.jsx)("label",{htmlFor:"",className:" flex md:justify-end xxxsm:w-full md:w-[20%]  text-[16px] xxxsm:text-sm xxsm:text-[16
1px] sm:text-[17px] 2xl:text-lg 4xl:text-[22px] 5xl:text-[27px] 6xl:text-3xl  text-[#434343] dark:text-main-heading-white font-medium",children:t("city")}),(0,M.jsxs)("div",{className:"xxxsm:w-full md:w-auto relative",children:[(0,M.jsxs)("select",{name:"city",onChange:e=>{h({...c,[e.target.name]:{id:Number(e.target.value)}})},id:"city",class:"outline-none border appearance-none placeholder-[#434343] border-[#e6e6e6] text-[14px] xxxsm:w-full md:w-[353px] p-[13px] rounded-md 2xl:w-[375px] 2xl:p-[15px] 2xl:text-base 4xl:w-[440px] 4xl:p-[16px] 4xl:text-lg 5xl:w-[520px] 5xl:p-[18px] 5xl:text-xl 6xl:w-[630px] 6xl:p-[20px] 6xl:text-2xl dark:border-border-color dark:bg-input-bg dark:text-main-heading-white dark:placeholder-main-heading-white",children:[(0,M.jsx)("option",{selected:""==c.city.id,children:t("select city")}),(0,M.jsx)("option",{selected:1==c.city.id,value:"1",children:t("manama")}),(0,M.jsx)("option",{selected:4==c.city.id,value:"4",children:t("muharraq")}),(0,M.jsx)("option",{selected:2==c.city.id,value:"2",children:t("riffa")}),(0,M.jsx)("option",{selected:5==c.city.id,value:"5",children:t("isa town")}),(0,M.jsx)("option",{selected:3==c.city.id,value:"3",children:t("sitra")})]}),(0,M.jsx)("div",{className:"pointer-events-none absolute inset-y-0 flex items-center   ".concat("ar"===x.language?"left-3":"right-3"),children:(0,M.jsx)("span",{className:"text-gray-500",children:(0,M.jsx)(o.q0c,{color:"#757575",className:" xxxsm:text-[25px] xsm:text-[28px] lg:text-[30px] 2xl:text-[32px] 3xl:text-[35px] 4xl:text-[37px] 5xl:text-[40px] 6xl:text-[44px]"})})})]})]}),(0,M.jsxs)("div",{className:"flex  xxxsm:flex-col xxxsm:gap-2 md:flex-row md:gap-4 md:items-center",children:[(0,M.jsx)("label",{htmlFor:"",className:" flex md:justify-end xxxsm:w-full md:w-[20%]  text-[16px] xxxsm:text-sm xxsm:text-[16px] sm:text-[17px] 4xl:text-[22px] 5xl:text-[27px] 6xl:text-3xl  text-[#434343] dark:text-main-heading-white font-medium",children:t("username")}),(0,M.jsx)("div",{className:"xxxsm:w-full md:w-[80%]",children:(0,M.jsx)("input",{type:"text",name:"username",value:c.username,onChange:C,placeholder:t("Arabiawheel786"),className:"outline-none border placeholder-[#434343] border-[#e6e6e6] text-[14px] xxxsm:w-full md:w-[353px] p-[13px] rounded-md 2xl:w-[375px] 2xl:p-[14px]  placeholder:2xl:text-base 4xl:w-[440px] 4xl:p-[16px] placeholder:4xl:text-lg  5xl:w-[520px] 5xl:p-[20px] placeholder:5xl:text-xl 6xl:w-[630px] 6xl:p-[24px] placeholder:6xl:text-2xl 2xl:text-base 4xl:text-lg 5xl:text-xl 6xl:text-2xl dark:border-border-color dark:bg-input-bg dark:text-main-heading-white dark:placeholder-main-heading-white"})})]}),(0,M.jsxs)("div",{className:"flex  xxxsm:flex-col xxxsm:gap-2 md:flex-row md:gap-4 md:items-center",children:[(0,M.jsx)("label",{htmlFor:"",className:"flex md:justify-end xxxsm:w-full md:w-[20%]  text-[16px] xxxsm:text-sm xxsm:text-[16px] sm:text-[17px] 2xl:text-lg  4xl:text-[22px] 5xl:text-[27px] 6xl:text-3xl text-[#434343] dark:text-main-heading-white font-medium",children:t("email")}),(0,M.jsx)("div",{className:"xxxsm:w-full md:w-[80%]",children:(0,M.jsx)("input",{type:"email",name:"email",value:c.email,onChange:C,placeholder:"[email protected]",className:"outline-none border placeholder-[#434343] border-[#e6e6e6] text-[14px] xxxsm:w-full md:w-[353px] p-[13px] rounded-md 2xl:w-[375px] 2xl:p-[14px]  placeholder:2xl:text-base 4xl:w-[440px] 4xl:p-[16px] placeholder:4xl:text-lg  5xl:w-[520px] 5xl:p-[20px] placeholder:5xl:text-xl 6xl:w-[630px] 6xl:p-[24px] placeholder:6xl:text-2xl 2xl:text-base 4xl:text-lg 5xl:text-xl 6xl:text-2xl dark:border-border-color dark:bg-input-bg dark:text-main-heading-white dark:placeholder-main-heading-white",readOnly:!0})})]})]})}),(0,M.jsx)("div",{className:" flex items-center justify-start md:justify-end hover:text-[#24527C] cursor-pointer text-[#518ecb] text-sm 2xl:text-[13px] 3xl:text-[15px] 4xl:text-lg 5xl:text-xl 6xl:text-2xl",children:(0,M.jsxs)(Ae.N_,{className:"flex gap-2 items-center pt-2 justify-center",to:"/dealer/reset-password",children:["Change Password ",(0,M.jsx)(a.EQc,{className:""})]})}),(0,M.jsx)("div",{className:" xxxsm:w-full  md:w-[78%]   xxxsm:ml-0  py-7 mb-1 mt-1 ".concat("ar"===x.language?"md:mr-auto lg:w-[83%]":"md:ml-auto lg:w-[78%]"),children:(0,M.jsx)("div",{className:"xxxsm:w-full  md:w-[90%]  lg:w-[80%] md:ml-auto xxxsm:flex xxxsm:justify-end md:justify-normal ",children:(0,M.jsx)("button",{onClick:async t=>{t.preventDefault();try{const t=localStorage.getItem("automotors__UserData");if(t){const x=(0,d.s)(t).id;await s.A.put("".concat("https://www.arabiawheel.com/automotor","/users/").concat(x),{...c,profileimg:z,dateOfBirth:y},{headers:{Authorization:"Bearer ".concat(e)}}),window.scrollTo({top:0}),r.oR.success("User updated successfully!")}}catch(v){b("Failed to update user data")}},type:"submit",className:"capitalize bg-[#233d7b] text-white hover:bg-[#1d3367] text-[14px] font-normal rounded-sm md:px-6 md:py-[9px] 4xl:py-[12px] 5xl:py-[14px] 6xl:py-[19px] 6xl:px-7  md:text-[14px] 2xl:text-base 3xl:text-[17px] 4xl:text-[19px] 5xl:text-[22px] 6xl:text-[25px] sm:px-5 sm:py-2 sm:text-[13px] xxxsm:px-[14px] xxxsm:py-2 xxxsm:text-xs  ",children:t("save change")})})})]})})})]})},et=()=>{const e=localStorage.getItem("automotors__UserData"),{t:t,i18n:x}=(0,p.Bd)(),[a,n]=(0,l.useState)(!1),[o,c]=(0,l.useState)(!0),[h,g]=(0,l.useState)(""),[f,v]=(0,l.useState)(""),[b,w]=(0,l.useState)(""),y=(0,u.zy)(),j=(new URLSearchParams(y.search).get("token"),(0,u.Zp
1)()),[N,k]=((0,i.wA)(),(0,l.useState)("50px")),C=(0,i.d4)((e=>e.auth.navheight));return(0,l.useEffect)((()=>{const e=()=>{window.innerWidth>767?k(C):k("50px")};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[C]),(0,M.jsxs)("div",{dir:window.directionTo,style:{paddingTop:N},className:"flex items-center justify-center xxxsm:h-[93vh] sm:h-[98vh] bg-gray-100 dark:bg-dark-from",children:[(0,M.jsxs)(m.mg,{children:[(0,M.jsx)("title",{children:t("passwordRecoveryTitle")}),(0,M.jsx)("meta",{name:"description",content:t("passwordRecoveryDescription")}),(0,M.jsx)("meta",{name:"keywords",content:t("passwordRecoveryKeywords")}),(0,M.jsx)("meta",{name:"robots",content:"index, follow"}),(0,M.jsx)("meta",{name:"author",content:"Arabiawheel Team"}),(0,M.jsx)("meta",{name:"publisher",content:"Arabiawheel"}),(0,M.jsx)("link",{rel:"canonical",href:"http://localhost:3000/"}),(0,M.jsx)("meta",{name:"lang",content:x.language})]}),(0,M.jsxs)("div",{className:"w-[70%] md:w-[50%]",children:[(0,M.jsx)("p",{className:"mb-5 xxxsm:text-[17px] xxsm:text-[18px] xsm:text-[19px] sm:text-xl 2xl:text-[22px] 3xl:text-2xl 4xl:text-[27px] 5xl:text-[32px] 6xl:text-[35px]  5xl:pb-1 6xl:pb-2 font-bold text-blue-500 text-center",children:t("change your password")}),(0,M.jsxs)("form",{onSubmit:async t=>{if(t.preventDefault(),n(!0),h==f)return w("Passwords is same."),r.oR.error("Passwords is same."),void n(!1);try{const t=localStorage.getItem("automotors__UserData");if(t){const x=(0,d.s)(t).id;200===(await s.A.put("".concat("https://www.arabiawheel.com/automotor","/users/changepassword/").concat(x),{oldPassword:h,newPassword:f},{headers:{Authorization:"Bearer ".concat(e)}})).status&&(n(!1),r.oR.success("Password changed successfully."),j("/dealer/dashboard"))}else console.error("User token not found.")}catch(x){n(!1),w("Error resetting password.")}},className:"flex flex-col w-full space-y-4",children:[(0,M.jsx)("input",{type:"password",placeholder:t("enter old password"),value:h,onChange:e=>g(e.target.value),className:"p-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500 2xl:p-[10px] 3xl:p-3 4xl:p-[14px] 5xl:p-4 6xl:p-5  placeholder:2xl:text-sm placeholder:3xl:text-base placeholder:4xl:text-lg placeholder:5xl:text-xl placeholder:6xl:text-[22px] dark:placeholder:text-gray-300 dark:border-border-color dark:bg-input-bg dark:text-gray-300 dark:placeholder-main-heading-white",required:!0}),(0,M.jsx)("input",{type:"password",placeholder:t("enter new password"),value:f,onChange:e=>v(e.target.value),className:"p-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500 2xl:p-[10px] 3xl:p-3 4xl:p-[14px] 5xl:p-4 6xl:p-5 placeholder:2xl:text-sm placeholder:3xl:text-base placeholder:4xl:text-lg placeholder:5xl:text-xl placeholder:6xl:text-[22px] dark:placeholder:text-gray-300 dark:border-border-color dark:bg-input-bg dark:text-gray-300 dark:placeholder-main-heading-white",required:!0}),(0,M.jsx)("button",{type:"submit",className:"p-2 bg-blue-500 font-semibold text-white rounded hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-400 2xl:p-[10px] 3xl:p-3 4xl:p-[14px] 5xl:p-4 6xl:p-5 2xl:text-[17px] 3xl:text-lg 4xl:text-xl 5xl:text-[23px] 6xl:text-[26px] ",children:a?(0,M.jsx)("div",{className:"w-8 h-8 4xl:w-9 4xl:h-9 4xl:border-6 border-4 border-white border-t-transparent border-solid rounded-full animate-spin mx-auto"}):t("submit")})]})]})]})},tt=()=>{const e=(0,l.useRef)(null),t=(0,l.useRef)(null);(0,l.useEffect)((()=>{const e=new ResizeObserver((e=>{for(let t of e)s(t.contentRect.width)}));return t.current&&e.observe(t.current),()=>{t.current&&e.unobserve(t.current)}}),[]);const x=(0,l.useRef)(null),[a,s]=(0,l.useState)(0);(0,l.useEffect)((()=>{const e=()=>{x.current&&s(x.current.offsetWidth)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]);const r=(0,l.useCallback)((t=>{t&&(x.current=t,e.current=t)}),[]);return(0,M.jsx)("div",{className:"dark:bg-dark-from",ref:r,dir:window.directionTo,children:(0,M.jsxs)("div",{className:"flex",children:[(0,M.jsx)(Ee,{}),(0,M.jsxs)("div",{className:"w-full h-full ",children:[(0,M.jsx)(Se,{}),(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)("div",{className:"bg-gray-200 dark:bg-cl-dashbord-bg sm:p-3 p-0",children:(0,M.jsx)(u.BV,{children:(0,M.jsx)(u.qh,{path:"/carbidding/:vehicleId",element:(0,M.jsx)(Ge,{})})})}),(0,M.jsx)("div",{className:"bg-gray-200 dark:bg-cl-dashbord-bg  p-3",children:(0,M.jsxs)(u.BV,{children:[(0,M.jsx)(u.qh,{index:!0,path:"/dashboard",element:(0,M.jsx)(he,{})}),(0,M.jsx)(u.qh,{path:"/addcar",element:(0,M.jsx)(De,{})}),(0,M.jsx)(u.qh,{path:"/edit-car/:id",element:(0,M.jsx)(De,{})}),(0,M.jsx)(u.qh,{path:"/profile",element:(0,M.jsx)(Qe,{})}),(0,M.jsx)(u.qh,{path:"/carbidding",element:(0,M.jsx)(qe,{})}),(0,M.jsx)(u.qh,{path:"/reset-password",element:(0,M.jsx)(et,{})})]})})]})]})]})})}}}]);
2//# sourceMappingURL=5512.dcbe93e0.chunk.js.map

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.