1import{j as t}from"./jsx-runtime-u17CrQMm.js";import{a as R,b as y,B as b}from"./brand-aware-icon-DS-PT2c7.js";import{r,F as de}from"./chunk-LFPYN7LY-BDMtIe0a.js";import{B as v,P as j}from"./index-B19RJfYB.js";import{S as ue}from"./arrow-left-DKKzDruw.js";import{S}from"./models-B4LcyGrw.js";import{u as _}from"./signalStore-BI6CDHF6.js";import{u as me}from"./embla-carousel-react.esm-CpiWSFwv.js";import{u as A,a as h}from"./useFeatureEnabled-BkcyNuW5.js";import{b as f}from"./footnotes.model-DnzNA7Ie.js";import{I as pe,a as F,u as ge,B as N}from"./usePopupAuth-BU-yuEEd.js";import{c as u,b as I,u as P}from"./cn-merged-A8Kx_WEf.js";import{m as fe}from"./proxy-BluTslxC.js";import{A as ve}from"./index-DKwp6-Ug.js";import{c as xe,j as Ae,a as he}from"./index-Cf43ZsCw.js";import{b as Ce,C as T,c as L,d as De,W as Ee,e as we,T as je,f as Ne,O as Re,g as ye}from"./index-gD_Ne9tc.js";import{C as be,k as Se,a as _e,c as Fe,d as Ie,e as Pe,g as Te,I as Le,h as Oe,f as Be,j as ke}from"./icon-close-DG6KH-NR.js";import{u as Me}from"./useHref-ChuGRv48.js";const ze=e=>r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...e},r.createElement("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"},r.createElement("path",{d:"M20.75 12a.5.5 0 0 0-.5-.5H3.75a.5.5 0 0 0 0 1h16.5a.5.5 0 0 0 .5-.5"}),r.createElement("path",{d:"M10.854 4.896a.5.5 0 0 0-.708 0l-6.75 6.75a.5.5 0 0 0 0 .708l6.75 6.75a.5.5 0 0 0 .708-.708L4.457 12l6.397-6.396a.5.5 0 0 0 0-.708"}))),He=r.forwardRef((e,a)=>t.jsx(R,{icons:{[v.CUPRA]:t.jsx(ue,{}),default:t.jsx(ze,{})},...e,ref:a}));He.displayName="IconArrowLeft";function It(e,a){const[o,s]=me(e?.options,e?.plugins),n=_(i=>i.emit),l=r.useCallback(i=>{n({type:S.GALLERY_SLIDE_CHANGED,toSlide:i.selectedScrollSnap(),car:a})},[n,a]);return r.useEffect(()=>{if(s)return s.on("select",l),()=>{s.off("select",l)}},[s,l]),[o,s]}function Pt(e){const a=A(h.FINANCE_CALC_STOCK),o=A(h.FINANCE_CALC_TEST_DRIVE),s=A(h.FINANCE_CALC_USED);return e.testDrive?o:e.usedVehicle?s:a}function Tt(e,a){return e===j.DEALER_PRICE?f.DEALER_PRICE:e===j.ONLINE_SALES_PRICE?f.ONLINE_SALES_PRICE:a?.showPriceAdvantage?f.OFFER_PRICE:a?.usedVehicle?f.DEALER_PRICE:f.BASE_PRICE}const $e=e=>r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...e},r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M10.788 3.21c.448-1.077 1.976-1.077 2.424 0l2.082 5.007 5.404.433c1.164.093 1.636 1.545.749 2.305l-4.117 3.527 1.257 5.273c.271 1.136-.964 2.033-1.96 1.425L12 18.354 7.373 21.18c-.996.608-2.231-.29-1.96-1.425l1.257-5.273-4.117-3.527c-.887-.76-.415-2.212.749-2.305l5.404-.433z",clipRule:"evenodd"})),Ve=e=>r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 32",...e},r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"m16 30-.203-.051C13.422 29.349 2 20.199 2 10.879 2 5.111 5.916 2 9.598 2 12.929 2 14.994 3.889 16 5.144 17.003 3.889 19.068 2 22.399 2 26.084 2 30 5.111 30 10.88c0 9.318-11.423 18.469-13.797 19.069z",clipRule:"evenodd"})),Ge=e=>r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"-0.5 -1 16 16",...e},r.createElement("path",{fill:"currentColor",d:"M15 4.52c0 .41-.06.83-.17 1.23-.88 3.13-6.83 7.62-7.09 7.81l-.25.19-.25-.19c-.25-.19-6.2-4.68-7.07-7.81-.5-1.8.14-3.72 1.63-4.84A4.49 4.49 0 0 1 6.74.6c.25.13.52.29.78.5 0 .01-.01.01-.02.02C8.32.39 9.38-.02 10.49 0 12.98-.01 15 2.02 15 4.52",className:"favourites-remove-seat_svg__cls-1"})),Ue=e=>r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"2.5 3 19 19",...e},r.createElement("path",{fill:"currentColor",d:"M12 20.58c5.2-3.78 8.62-7.2 8.62-10.94 0-2.76-2.12-5.06-4.98-5.06-1.54 0-2.9.78-3.64 2.12-.74-1.34-2.1-2.12-3.64-2.12-2.86 0-4.98 2.3-4.98 5.06 0 3.74 3.42 7.16 8.62 10.94"})),Ye=e=>r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 23",...e},r.createElement("path",{fill:"currentColor",d:"M18.42 22.62 12 18.12l-6.38 4.5-1-.74 2.28-7.53L.6 9.67 1 8.5l7.87-.16L11.38.95h1.26l2.58 7.43L23 8.5l.39 1.19-6.27 4.76 2.31 7.45z"})),O=r.forwardRef((e,a)=>t.jsx(R,{icons:{default:t.jsx(Ye,{}),[v.CUPRA]:t.jsx(Ve,{}),[v.AUDI]:t.jsx($e,{}),[v.SEAT]:t.jsx(Ge,{}),[v.SKODA]:t.jsx(Ue,{})},...e,ref:a}));O.displayName="IconFavouritesRemove";function Lt({isFavourited:e,className:a}){return t.jsxs("div",{className:"relative",children:[t.jsx(pe,{className:u("size-6",a)}),t.jsx(ve,{initial:!1,children:t.jsx(fe.div,{className:"absolute inset-0",initial:{opacity:0}
1,animate:{opacity:e?1:0},transition:{duration:.3,ease:"easeInOut"},children:t.jsx(O,{className:u("size-6",a)})})})]})}var B="AlertDialog",[We]=he(B,[L]),m=L(),k=e=>{const{__scopeAlertDialog:a,...o}=e,s=m(a);return t.jsx(Ce,{...s,...o,modal:!0})};k.displayName=B;var Ke="AlertDialogTrigger",qe=r.forwardRef((e,a)=>{const{__scopeAlertDialog:o,...s}=e,n=m(o);return t.jsx(ye,{...n,...s,ref:a})});qe.displayName=Ke;var Xe="AlertDialogPortal",M=e=>{const{__scopeAlertDialog:a,...o}=e,s=m(a);return t.jsx(De,{...s,...o})};M.displayName=Xe;var Je="AlertDialogOverlay",z=r.forwardRef((e,a)=>{const{__scopeAlertDialog:o,...s}=e,n=m(o);return t.jsx(Re,{...n,...s,ref:a})});z.displayName=Je;var g="AlertDialogContent",[Qe,Ze]=We(g),et=Ae("AlertDialogContent"),H=r.forwardRef((e,a)=>{const{__scopeAlertDialog:o,children:s,...n}=e,l=m(o),i=r.useRef(null),p=I(a,i),c=r.useRef(null);return t.jsx(Ee,{contentName:g,titleName:$,docsSlug:"alert-dialog",children:t.jsx(Qe,{scope:o,cancelRef:c,children:t.jsxs(we,{role:"alertdialog",...l,...n,ref:p,onOpenAutoFocus:xe(n.onOpenAutoFocus,d=>{d.preventDefault(),c.current?.focus({preventScroll:!0})}),onPointerDownOutside:d=>d.preventDefault(),onInteractOutside:d=>d.preventDefault(),children:[t.jsx(et,{children:s}),t.jsx(at,{contentRef:i})]})})})});H.displayName=g;var $="AlertDialogTitle",V=r.forwardRef((e,a)=>{const{__scopeAlertDialog:o,...s}=e,n=m(o);return t.jsx(je,{...n,...s,ref:a})});V.displayName=$;var G="AlertDialogDescription",U=r.forwardRef((e,a)=>{const{__scopeAlertDialog:o,...s}=e,n=m(o);return t.jsx(Ne,{...n,...s,ref:a})});U.displayName=G;var tt="AlertDialogAction",Y=r.forwardRef((e,a)=>{const{__scopeAlertDialog:o,...s}=e,n=m(o);return t.jsx(T,{...n,...s,ref:a})});Y.displayName=tt;var W="AlertDialogCancel",K=r.forwardRef((e,a)=>{const{__scopeAlertDialog:o,...s}=e,{cancelRef:n}=Ze(W,o),l=m(o),i=I(a,n);return t.jsx(T,{...l,...s,ref:i})});K.displayName=W;var at=({contentRef:e})=>{const a=`\`${g}\` requires a description for the component to be accessible for screen reader users. 2 3You can add a description to the \`${g}\` by passing a \`${G}\` component as a child, which also benefits sighted users by adding visible context to the dialog. 4 5Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${g}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component. 6 7For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return r.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(a)},[a,e]),null},ot=k,rt=M,q=z,X=H,C=Y,D=K,J=V,Q=U;const st=ot,nt=rt,Z=r.forwardRef(({className:e,...a},o)=>t.jsx(q,{className:u("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-modal bg-drawer-background data-[state=closed]:animate-out data-[state=open]:animate-in",e),...a,ref:o}));Z.displayName=q.displayName;const ee=r.forwardRef(({className:e,...a},o)=>t.jsxs(nt,{children:[t.jsx(Z,{}),t.jsx(X,{ref:o,className:u("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed top-1/2 left-1/2 z-modal grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-background p-6 duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in","cupra:rounded-none","audi:rounded-none","seat:rounded-xs",e),...a})]}));ee.displayName=X.displayName;const te=({className:e,...a})=>t.jsx("div",{className:u("flex flex-row items-center justify-center gap-6",e),...a});te.displayName="AlertDialogFooter";const ae=r.forwardRef(({className:e,...a},o)=>t.jsx(J,{ref:o,className:u("font-semibold text-lg",e),...a}));ae.displayName=J.displayName;const oe=r.forwardRef(({className:e,...a},o)=>t.jsx(Q,{ref:o,className:u("text-muted-foreground text-sm",e),...a}));oe.displayName=Q.displayName;const it=r.forwardRef(({className:e,...a},o)=>t.jsx(C,{ref:o,className:u(y(),"h-full",e),...a}));it.displayName=C.displayName;const lt=r.forwardRef(({className:e,...a},o)=>t.jsx(D,{ref:o,className:u(y({variant:"outline-inverted"}),e),...a}));lt.displayName=D.displayName;const ct="/assets/alert-BYsy97LX.webp",re=r.createContext(null);function dt(){const e=r.useContext(re);
7if(!e)throw new Error("useFavouriteTriggerContext must be used within a FavouriteTriggerContextProvider.");return e}const ut=r.forwardRef(({car:e,className:a,children:o,...s},n)=>{const{favourites:l}=F(),i=Me(),p=_(d=>d.emit),c=l.includes(e.identicalCarHash);return t.jsx(re.Provider,{value:{identicalCarHash:e.identicalCarHash},children:t.jsxs(de,{ref:n,onSubmit:()=>{p({change:c?"remove":"add",type:S.MODIFY_FAVOURITE,car:e})},action:i("favourites"),method:"post",preventScrollReset:!0,className:a,...s,children:[t.jsx("input",{type:"hidden",name:"intent",value:c?"remove":"add"}),t.jsx("input",{type:"hidden",name:"identicalCarHash",value:e.identicalCarHash}),o]})})});ut.displayName="FavouriteTriggerForm";const mt=r.forwardRef(({className:e,variant:a="link",size:o="fit",children:s,...n},l)=>{const{t:i}=P("mp_common",{keyPrefix:"favourites"}),{identicalCarHash:p}=dt(),{favourites:c,allowedToAdd:d}=F(),[x,E]=r.useState(c.includes(p)),[se,w]=r.useState(!1),ne=i(x?"favourites-remove-aria-label":"favourites-add-aria-label");r.useEffect(()=>{E(c.includes(p))},[c,p]);const ie=le=>{d||x?E(ce=>!ce):(le.preventDefault(),w(!0))};return t.jsxs(t.Fragment,{children:[t.jsx(b,{ref:l,variant:a,size:o,type:"submit",onClick:ie,className:e,"aria-label":ne,...n,children:s({isFavourited:x})}),t.jsx(pt,{isOpen:se,close:()=>w(!1)})]})});mt.displayName="FavouriteTriggerButton";function pt({isOpen:e,close:a}){const{t:o}=P("mp_common",{keyPrefix:"favourites.dialog"}),s=ge(),n=t.jsx("img",{src:ct,className:"mx-auto",alt:o("img-alt-text")}),l=t.jsx(N,{variant:"link",size:"fit",className:"font-normal text-base",onClick:a,children:o("cancel-button")}),i=t.jsx(N,{size:"fit",onClick:()=>{s(),a()},children:o("login-button")});return t.jsx(be,{desktopVariant:t.jsx(st,{open:e,onOpenChange:a,children:t.jsxs(ee,{className:"w-[460px] bg-carlog-background text-center font-carlog text-carlog-foreground",children:[n,t.jsx(ae,{className:"font-bold text-lg",children:o("heading")}),t.jsx(oe,{className:"text-base text-carlog-foreground",children:o("description")}),t.jsxs(te,{className:"mt-3",children:[t.jsx(C,{asChild:!0,children:l}),t.jsx(D,{asChild:!0,children:i})]})]})}),mobileVariant:t.jsx(Se,{open:e,onClose:a,children:t.jsxs(_e,{children:[t.jsxs(Fe,{children:[t.jsxs(Ie,{children:[t.jsx(Pe,{className:"font-carlog text-carlog-foreground",children:"Carlog"}),t.jsx("div",{className:"col-start-3 flex justify-end",children:t.jsx(Te,{asChild:!0,children:t.jsx(b,{variant:"link",size:"fit",onClick:a,children:t.jsx(Le,{className:"size-5"})})})})]}),t.jsx(Oe,{})]}),t.jsx(Be,{className:"bg-carlog-background text-center font-carlog text-carlog-foreground",children:t.jsxs("div",{children:[n,t.jsx("div",{className:"font-bold text-lg",children:o("heading")}),t.jsx("div",{children:o("description")})]})}),t.jsxs(ke,{className:"mt-3 items-center justify-center gap-3",children:[l,i]})]})})})}export{ut as F,He as I,mt as a,Lt as b,Pt as c,O as d,Tt as g,It as u};
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.