1/*! For license information please see 6620.a0026339.chunk.js.LICENSE.txt */ 2"use strict";(self.webpackChunkfrontend=self.webpackChunkfrontend||[]).push([[6620],{4239:(e,a,s)=>{s.d(a,{CarRental:()=>f});var t=s(65043),l=s(91140),r=s(13390),i=s(92264),n=s(28646),c=s(23988),o=s(28006),d=s(83796),m=s(39292),x=s(18163),h=s(38842),g=s(46913),u=s(70579);const p="https://balkandestination.com",f=()=>{const e=(0,x.Zp)(),{t:a,language:s,getLocalizedPath:f}=(0,g.ok)(),[j,w]=(0,t.useState)([]),[N,b]=(0,t.useState)(!0),[v,y]=(0,t.useState)(""),[C,k]=(0,t.useState)(""),[S,$]=(0,t.useState)(""),[A,D]=(0,t.useState)([]);(0,t.useEffect)(()=>{(async()=>{try{if("en"!==s){const e=await fetch(`${p}/api/translations/list/car_rental/${s}?limit=200`);if(e.ok){const a=await e.json();if(a.items&&a.items.length>0)return w(a.items),D(a.items),void b(!1)}}const e=await fetch(`${p}/api/car-rental-companies?status=active`),a=await e.json();w(a),D(a),b(!1)}catch(e){console.error("Failed to load car rental companies:",e),b(!1)}})()},[s]),(0,t.useEffect)(()=>{let e=j;v&&(e=e.filter(e=>{var a,s,t;return(null===(a=e.name)||void 0===a?void 0:a.toLowerCase().includes(v.toLowerCase()))||(null===(s=e.city)||void 0===s?void 0:s.toLowerCase().includes(v.toLowerCase()))||(null===(t=e.address)||void 0===t?void 0:t.toLowerCase().includes(v.toLowerCase()))})),D(e)},[v,j]);const L=()=>(new Date).toISOString().split("T")[0];return(0,u.jsxs)("div",{className:"min-h-screen bg-gradient-to-b from-gray-50 to-white",children:[(0,u.jsx)(h.au,{title:"Car Rental in Kosovo & Albania | Balkan Car Hire",description:"Rent a car in Kosovo, Albania, Montenegro, and the Balkans. Affordable rates, flexible options, wide selection of vehicles for your Balkan road trip.",canonical:"/car-rental"}),(0,u.jsx)(h.BI,{items:[{name:a("home"),url:f("/")},{name:a("carRental")}]}),(0,u.jsx)("div",{className:"bg-gradient-to-r from-orange-600 to-red-600 text-white py-16",children:(0,u.jsxs)("div",{className:"container mx-auto px-4",children:[(0,u.jsx)("h1",{className:"text-4xl sm:text-5xl font-bold mb-4",style:{fontFamily:"Space Grotesk, sans-serif"},"data-testid":"car-rental-title",children:a("carRental")}),(0,u.jsx)("p",{className:"text-lg max-w-2xl",children:a("searchCars")})]})}),(0,u.jsxs)("div",{className:"container mx-auto px-4 py-12",children:[(0,u.jsx)(l.Zp,{className:"mb-8 shadow-lg",children:(0,u.jsxs)(l.Wu,{className:"p-6",children:[(0,u.jsx)("h2",{className:"text-2xl font-bold mb-4",children:a("searchCars")}),(0,u.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[(0,u.jsxs)("div",{className:"space-y-2",children:[(0,u.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center gap-2",children:[(0,u.jsx)(o.A,{className:"h-4 w-4"}),a("location")]}),(0,u.jsx)(i.p,{type:"text",placeholder:a("searchByLocation"),value:v,onChange:e=>y(e.target.value),className:"w-full"})]}),(0,u.jsxs)("div",{className:"space-y-2",children:[(0,u.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center gap-2",children:[(0,u.jsx)(n.A,{className:"h-4 w-4"}),a("pickupDate")]}),(0,u.jsx)(i.p,{type:"date",value:C,onChange:e=>k(e.target.value),min:L(),className:"w-full"})]}),(0,u.jsxs)("div",{className:"space-y-2",children:[(0,u.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center gap-2",children:[(0,u.jsx)(n.A,{className:"h-4 w-4"}),a("returnDate")]}),(0,u.jsx)(i.p,{type:"date",value:S,onChange:e=>$(e.target.value),min:(()=>{if(!C)return L();const e=new Date(C);return e.setDate(e.getDate()+1),e.toISOString().split("T")[0]})(),disabled:!C,className:"w-full"})]}),(0,u.jsxs)("div",{className:"space-y-2",children:[(0,u.jsx)("label",{className:"text-sm font-medium text-gray-700 opacity-0",children:"Search"}),(0,u.jsxs)(r.$,{onClick:()=>{if(A.length>0&&C&&S){const a=new URLSearchParams({pickup:C,return:S}),s=A[0].slug||A[0].id;e(f(`/car-rental/${s}?${a.toString()}`))}},className:"w-full bg-[#41B649] hover:bg-[#379741]",disabled:!C||!S,children:[(0,u.jsx)(m.A,{className:"h-4 w-4 mr-2"}),a("searchCars")]})]})]}),C&&S&&(0,u.jsxs)("p",{className:"text-sm text-gray-600 mt-4",children:["Rental peri
2od: ",new Date(C).toLocaleDateString()," - ",new Date(S).toLocaleDateString(),"(",Math.ceil((new Date(S)-new Date(C))/864e5)," days)"]})]})}),N?(0,u.jsxs)("div",{className:"text-center py-12",children:[(0,u.jsx)("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-[#41B649] mx-auto mb-4"}),(0,u.jsx)("p",{className:"text-gray-600",children:a("loadingResults")})]}):0===A.length?(0,u.jsxs)("div",{className:"text-center py-12",children:[(0,u.jsx)(c.A,{className:"h-16 w-16 text-gray-500 mx-auto mb-4"}),(0,u.jsx)("p",{className:"text-gray-600",children:a("noResultsFound")})]}):(0,u.jsxs)("div",{children:[(0,u.jsxs)("h2",{className:"text-2xl font-bold mb-6",children:[a("searchCars")," (",A.length,")"]}),(0,u.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:A.map(e=>(0,u.jsxs)(l.Zp,{className:"hover-lift overflow-hidden cursor-pointer","data-testid":`company-card-${e.id}`,onClick:()=>window.location.href=`/car-rental/${e.slug||e.id}`,children:[(0,u.jsx)("div",{className:"image-zoom-container aspect-video bg-white border border-gray-300",children:e.logo?(0,u.jsx)("div",{className:"w-full h-full flex items-center justify-center p-8",children:(0,u.jsx)("img",{src:`${p}/api${e.logo}`,alt:e.name,className:"max-w-full max-h-full object-contain image-zoom"})}):e.images&&e.images[0]?(0,u.jsx)("img",{src:`${p}/api${e.images[0]}`,alt:e.name,className:"w-full h-full object-cover image-zoom"}):(0,u.jsx)("div",{className:"w-full h-full flex items-center justify-center text-gray-500 bg-gray-100",children:(0,u.jsx)(c.A,{className:"h-16 w-16"})})}),(0,u.jsxs)(l.Wu,{className:"p-6",children:[(0,u.jsx)("h3",{className:"text-xl font-semibold text-[#333333] mb-2",style:{fontFamily:"Space Grotesk, sans-serif"},children:e.name}),e.location&&(0,u.jsxs)("p",{className:"text-sm text-gray-600 mb-2",children:["\ud83d\udccd ",e.location]}),e.address&&(0,u.jsx)("p",{className:"text-sm text-gray-600 mb-3",children:e.address}),(0,u.jsx)("p",{className:"text-sm text-gray-600 mb-4 line-clamp-2",children:e.short_description||e.description}),e.google_maps_url&&(0,u.jsxs)(r.$,{onClick:()=>window.open(e.google_maps_url,"_blank","noopener,noreferrer"),variant:"outline",size:"sm",className:"w-full flex items-center justify-center gap-2 border-[#41B649] text-[#41B649] hover:bg-[#41B649] hover:text-white mt-3","data-testid":`view-map-button-${e.id}`,children:[(0,u.jsx)(d.A,{className:"h-4 w-4"}),a("location")]})]})]},e.id))})]})]})]})}},39292:(e,a,s)=>{s.d(a,{A:()=>t});const t=(0,s(77784).A)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]])}}]); 3//# sourceMappingURL=6620.a0026339.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.