/*!
 * Built by ShiftSoftware
 * Copyright (c)
 */
import { r as registerInstance, h, H as Host, a as getElement } from './index-Bf4Ol6Qt.js';
import { g as getMockFile } from './get-mock-files-B0jARRLE.js';
import { c as create$3, d as sharedLocalesSchema } from './types-BDhR4pDq.js';
import { S as ServiceHistorySchema, p as paintThicknessSchema, c as claimableItemsSchema, s as specificationSchema, a as accessoriesSchema, w as warrantySchema } from './type-Pq-OZXzH.js';
import { V as VehicleInfoLayout } from './vehicle-info-layout-Cp9U6H1C.js';
import { a as getLocaleLanguage, g as getSharedLocal } from './get-local-language-CE9dtbnG.js';
import './cn-BK16Cn81.js';

const vehicleLookupWrapperSchema = create$3({
    warranty: warrantySchema,
    accessories: accessoriesSchema,
    specification: specificationSchema,
    claimableItems: claimableItemsSchema,
    paintThickness: paintThicknessSchema,
    serviceHistory: ServiceHistorySchema,
});

const vehicleLookupCss = "*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:\"\"}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.\\!pointer-events-none{pointer-events:none!important}.absolute{position:absolute}.\\!relative{position:relative!important}.relative{position:relative}.left-0{left:0}.top-0{top:0}.z-10{z-index:10}.block{display:block}.flex{display:flex}.hidden{display:none}.size-\\[32px\\]{height:32px;width:32px}.origin-left{transform-origin:left}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.items-center{align-items:center}.justify-center{justify-content:center}.\\!overflow-hidden{overflow:hidden!important}.rounded-\\[4px\\]{border-radius:4px}.rounded-full{border-radius:9999px}.border{border-width:1px}.border-\\[\\#e0c97a\\]{--tw-border-opacity:1;border-color:rgb(224 201 122/var(--tw-border-opacity,1))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.text-\\[\\#c08a0e\\]{--tw-text-opacity:1;color:rgb(192 138 14/var(--tw-text-opacity,1))}.opacity-0{opacity:0}.opacity-100{opacity:1}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.duration-500{transition-duration:.5s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.shift-skeleton{border-radius:4px;position:relative!important}.loading .shift-skeleton,.loading.shift-skeleton{border-style:none!important;overflow:hidden!important;pointer-events:none!important;position:relative!important}.shift-skeleton:after{background:linear-gradient(-45deg,#d4d8de,#e2e5e9,#d4d8de);background-size:300% 300%;border-radius:inherit!important;content:\"\";height:100%;left:0;opacity:0;pointer-events:none;position:absolute;top:0;transform-origin:left;transition-duration:.5s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);width:100%;z-index:10}.loading .shift-skeleton:after,.loading.shift-skeleton:after{--tw-scale-x:1;animation:shimmer 2s ease-in-out infinite;opacity:1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes shimmer{0%{background-position:100% 0}50%{background-position:0 100%}to{background-position:100% 0}}.vehicle-info-container{background-color:#fdfdfd;border:1px solid #dcdcdc;border-radius:5px;box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 hsla(0,0%,100%,.1);overflow:hidden;padding:0;position:relative;transition-duration:.5s;transition-property:all}::-webkit-scrollbar{height:10px;width:10px}::-webkit-scrollbar-track{background:#f6f6f6;border-radius:5px;border-top:1px solid #dcdcdc;border-top-left-radius:0;border-top-right-radius:0}::-webkit-scrollbar-thumb{background:#c5c5c5;border-radius:10px}::-webkit-scrollbar-thumb:hover{background:#a1a1a1}.hide-scroll ::-webkit-scrollbar-thumb,.hide-scroll::-webkit-scrollbar-thumb,.loading ::-webkit-scrollbar-thumb{background:transparent}.vehicle-info-body{display:flex;flex-direction:column;overflow:hidden;position:relative;transition-duration:.5s;transition-property:all;transition-timing-function:ease-in-out}.vehicle-info-content{transition-duration:.5s;transition-property:all;width:100%}.vehicle-info-header{align-items:center;background-color:#f6f6f6;border:1px solid #ededed;display:flex;height:54px;justify-content:center;position:relative;text-align:center}.vehicle-info-header-action{align-items:center;display:flex;position:absolute;right:12px;top:50%;transform:translateY(-50%)}.vehicle-info-header-vin{display:inline-block;font-size:16px;transition-duration:.5s;transition-property:all}.vehicle-info-header-vin span{color:#ef4444}.loading .vehicle-info-header-vin{opacity:0;transform:scale(1.5);visibility:hidden}:host{all:initial!important;display:block;font-family:inherit!important;font-family:Noto Kufi Arabic,Nunito,Roboto,Arial,sans-serif!important}.part-lookup,.part-lookup *{font-family:Noto Kufi Arabic,Nunito,Roboto,Arial,sans-serif!important}.trace-trigger-button{--tw-border-opacity:1;--tw-bg-opacity:1;--tw-text-opacity:1;--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);align-items:center;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));border-color:rgb(224 201 122/var(--tw-border-opacity,1));border-radius:9999px;border-width:1px;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);color:rgb(192 138 14/var(--tw-text-opacity,1));cursor:pointer;display:flex;height:32px;justify-content:center;transition-duration:.2s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);width:32px}.trace-trigger-button:hover{--tw-border-opacity:1;--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(252 248 227/var(--tw-bg-opacity,1));border-color:rgb(192 138 14/var(--tw-border-opacity,1));color:rgb(138 109 59/var(--tw-text-opacity,1))}.trace-trigger-button svg{height:18px;width:18px}.hover\\:border-\\[\\#c08a0e\\]:hover{--tw-border-opacity:1;border-color:rgb(192 138 14/var(--tw-border-opacity,1))}.hover\\:bg-\\[\\#fcf8e3\\]:hover{--tw-bg-opacity:1;background-color:rgb(252 248 227/var(--tw-bg-opacity,1))}.hover\\:text-\\[\\#8a6d3b\\]:hover{--tw-text-opacity:1;color:rgb(138 109 59/var(--tw-text-opacity,1))}.static{position:static}.h-\\[200px\\]{height:200px}.w-full{width:100%}.text-\\[26px\\]{font-size:26px}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.pointer-events-none{pointer-events:none}.mx-auto{margin-left:auto;margin-right:auto}.size-\\[100px\\]{height:100px;width:100px}.size-full{height:100%;width:100%}.h-auto{height:auto}.max-h-\\[100px\\]{max-height:100px}.w-auto{width:auto}.w-fit{width:fit-content}.max-w-\\[100px\\]{max-width:100px}.shrink-0{flex-shrink:0}.flex-col{flex-direction:column}.gap-\\[4px\\]{gap:4px}.overflow-x-auto{overflow-x:auto}.rounded-lg{border-radius:.5rem}.bg-black\\/40{background-color:rgba(0,0,0,.4)}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.shadow,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring-0{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.duration-300{transition-duration:.3s}.hover\\:opacity-100:hover{opacity:1}.\\[\\&_div\\]\\:hover\\:\\!opacity-100:hover div{opacity:1!important}.\\[\\&_img\\]\\:hover\\:shadow-lg:hover img{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.pointer-events-auto{pointer-events:auto}.bottom-\\[40px\\]{bottom:40px}.left-1\\/2{left:50%}.left-\\[30px\\]{left:30px}.ml-\\[-125px\\]{margin-left:-125px}.box-content{box-sizing:content-box}.size-\\[30px\\]{height:30px;width:30px}.size-\\[90px\\]{height:90px;width:90px}.h-10{height:2.5rem}.h-\\[320px\\]{height:320px}.h-full{height:100%}.w-1\\/2{width:50%}.w-\\[150\\%\\]{width:150%}.w-\\[90\\%\\]{width:90%}.w-\\[calc\\(100\\%-0px\\)\\]{width:100%}.w-\\[calc\\(100\\%-60px\\)\\]{width:calc(100% - 60px)}.min-w-full{min-width:100%}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.translate-y-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y:0px}.translate-y-\\[-50\\%\\]{--tw-translate-y:-50%}.translate-y-\\[-50\\%\\],.translate-y-\\[-5px\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\\[-5px\\]{--tw-translate-y:-5px}.scale-100{--tw-scale-x:1;--tw-scale-y:1}.scale-100,.scale-\\[70\\%\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-\\[70\\%\\]{--tw-scale-x:70%;--tw-scale-y:70%}.resize{resize:both}.justify-between{justify-content:space-between}.gap-\\[250px\\]{gap:250px}.overflow-hidden{overflow:hidden}.overflow-x-hidden{overflow-x:hidden}.overflow-y-hidden{overflow-y:hidden}.overflow-x-scroll{overflow-x:scroll}.rounded-\\[6px\\]{border-radius:6px}.border-\\[\\#faebcc\\]{--tw-border-opacity:1;border-color:rgb(250 235 204/var(--tw-border-opacity,1))}.bg-\\[\\#1a1a1a\\]{--tw-bg-opacity:1;background-color:rgb(26 26 26/var(--tw-bg-opacity,1))}.bg-\\[\\#fcf8e3\\]{--tw-bg-opacity:1;background-color:rgb(252 248 227/var(--tw-bg-opacity,1))}.bg-\\[linear-gradient\\(to_bottom\\2c _\\#428bca_0\\%\\2c _\\#3071a9_100\\%\\)\\]{background-image:linear-gradient(180deg,#428bca,#3071a9)}.p-\\[25px\\]{padding:25px}.px-\\[30px\\]{padding-left:30px;padding-right:30px}.pt-\\[16px\\]{padding-top:16px}.text-\\[16px\\]{font-size:16px}.text-\\[22px\\]{font-size:22px}.font-semibold{font-weight:600}.text-\\[\\#8a6d3b\\]{--tw-text-opacity:1;color:rgb(138 109 59/var(--tw-text-opacity,1))}.text-slate-700{--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity,1))}.\\[\\&_\\*\\]\\:shrink-0 *{flex-shrink:0}.my-auto{margin-bottom:auto;margin-top:auto}.size-\\[18px\\]{height:18px;width:18px}.h-\\[150px\\]{height:150px}.w-\\[84px\\]{width:84px}.max-w-full{max-width:100%}.flex-wrap{flex-wrap:wrap}.gap-\\[16px\\]{gap:16px}.gap-\\[6px\\]{gap:6px}.gap-\\[8px\\]{gap:8px}.border-b{border-bottom-width:1px}.border-slate-200{--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity,1))}.bg-slate-100{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.bg-slate-50{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity,1))}.p-\\[12px\\]{padding:12px}.p-\\[6px\\]{padding:6px}.px-\\[16px\\]{padding-left:16px;padding-right:16px}.px-\\[24px\\]{padding-left:24px;padding-right:24px}.py-\\[10px\\]{padding-bottom:10px;padding-top:10px}.py-\\[15px\\]{padding-bottom:15px;padding-top:15px}.py-\\[16px\\]{padding-bottom:16px;padding-top:16px}.text-center{text-align:center}.last\\:border-b-0:last-child{border-bottom-width:0}.hover\\:bg-sky-100\\/50:hover{background-color:rgba(224,242,254,.5)}.mt-\\[4px\\]{margin-top:4px}.max-w-\\[460px\\]{max-width:460px}.max-w-\\[520px\\]{max-width:520px}.translate-y-\\[-4px\\]{--tw-translate-y:-4px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.select-none{user-select:none}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-start{justify-content:flex-start}.gap-\\[12px\\]{gap:12px}.gap-\\[2px\\]{gap:2px}.overflow-auto{overflow:auto}.\\!rounded-\\[12px\\]{border-radius:12px!important}.rounded-\\[14px\\]{border-radius:14px}.p-\\[16px\\]{padding:16px}.px-\\[12px\\]{padding-left:12px;padding-right:12px}.px-\\[14px\\]{padding-left:14px;padding-right:14px}.py-\\[12px\\]{padding-bottom:12px;padding-top:12px}.\\!pb-0{padding-bottom:0!important}.text-\\[13\\.5px\\]{font-size:13.5px}.leading-\\[1\\.35\\]{line-height:1.35}.text-amber-900\\/90{color:rgba(120,53,15,.9)}.transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}@media (min-width:768px){.md\\:justify-between{justify-content:space-between}}.\\[\\&\\>div\\]\\:grow>div{flex-grow:1}.my-2{margin-bottom:.5rem;margin-top:.5rem}.grow{flex-grow:1}.fixed{position:fixed}.mt-\\[32px\\]{margin-top:32px}.h-\\[25px\\]{height:25px}.h-\\[50px\\]{height:50px}.h-\\[8px\\]{height:8px}.bg-\\[\\#f6f6f6\\]{--tw-bg-opacity:1;background-color:rgb(246 246 246/var(--tw-bg-opacity,1))}.pt-\\[40px\\]{padding-top:40px}.text-\\[18px\\]{font-size:18px}.font-bold{font-weight:700}.success-card{background-color:#d0e7de;border-color:#a2d0bb;color:#0b3521}.reject-card{background-color:#f7d7d8;border-color:#f2aeb5;color:#58151c}.sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.-left-full{left:-100%}.end-\\[16px\\]{inset-inline-end:16px}.left-full{left:100%}.right-\\[50px\\]{right:50px}.z-20{z-index:20}.z-\\[999\\]{z-index:999}.mb-\\[16px\\]{margin-bottom:16px}.mt-\\[16px\\]{margin-top:16px}.mt-\\[20px\\]{margin-top:20px}.mt-\\[50px\\]{margin-top:50px}.box-border{box-sizing:border-box}.size-\\[20px\\]{height:20px;width:20px}.size-\\[24px\\]{height:24px;width:24px}.size-\\[25px\\]{height:25px;width:25px}.size-\\[35px\\]{height:35px;width:35px}.h-\\[100dvh\\]{height:100dvh}.h-\\[140px\\]{height:140px}.h-\\[16px\\]{height:16px}.h-\\[30px\\]{height:30px}.h-\\[32px\\]{height:32px}.h-\\[36px\\]{height:36px}.h-\\[40px\\]{height:40px}.h-fit{height:fit-content}.max-h-\\[200px\\]{max-height:200px}.w-\\[200px\\]{width:200px}.w-\\[300px\\]{width:300px}.min-w-\\[100dvw\\]{min-width:100dvw}.max-w-\\[200px\\]{max-width:200px}.max-w-\\[250px\\]{max-width:250px}.max-w-\\[400px\\]{max-width:400px}.flex-1{flex:1 1 0%}.-translate-y-\\[32px\\]{--tw-translate-y:-32px}.-translate-y-\\[32px\\],.translate-y-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\\[32px\\]{--tw-translate-y:32px}.rotate-\\[45deg\\],.translate-y-\\[32px\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-\\[45deg\\]{--tw-rotate:45deg}.scale-100,.scale-\\[110\\%\\]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-\\[110\\%\\]{--tw-scale-x:110%;--tw-scale-y:110%}.cursor-default{cursor:default}.gap-\\[10px\\]{gap:10px}.gap-\\[20px\\]{gap:20px}.gap-\\[32px\\]{gap:32px}.gap-\\[75px\\]{gap:75px}.truncate{overflow:hidden;white-space:nowrap}.text-ellipsis,.truncate{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-\\[5px\\]{border-radius:5px}.rounded-\\[8px\\]{border-radius:8px}.border-\\[2px\\]{border-width:2px}.border-\\[\\#27ae60\\]{--tw-border-opacity:1;border-color:rgb(39 174 96/var(--tw-border-opacity,1))}.border-\\[\\#3071a9\\]{--tw-border-opacity:1;border-color:rgb(48 113 169/var(--tw-border-opacity,1))}.border-\\[\\#dcdcdc\\]{--tw-border-opacity:1;border-color:rgb(220 220 220/var(--tw-border-opacity,1))}.border-\\[\\#ddd\\]{--tw-border-opacity:1;border-color:rgb(221 221 221/var(--tw-border-opacity,1))}.border-\\[\\#f4f4f4\\]{--tw-border-opacity:1;border-color:rgb(244 244 244/var(--tw-border-opacity,1))}.border-\\[\\#ff9100\\]{--tw-border-opacity:1;border-color:rgb(255 145 0/var(--tw-border-opacity,1))}.border-\\[\\#ffb74d\\]{--tw-border-opacity:1;border-color:rgb(255 183 77/var(--tw-border-opacity,1))}.border-\\[\\#ffd28f\\]{--tw-border-opacity:1;border-color:rgb(255 210 143/var(--tw-border-opacity,1))}.bg-\\[\\#275e8f\\]{--tw-bg-opacity:1;background-color:rgb(39 94 143/var(--tw-bg-opacity,1))}.bg-\\[\\#32b267\\]{--tw-bg-opacity:1;background-color:rgb(50 178 103/var(--tw-bg-opacity,1))}.bg-\\[\\#d5d5d5\\]{--tw-bg-opacity:1;background-color:rgb(213 213 213/var(--tw-bg-opacity,1))}.bg-\\[\\#f4f4f4\\]{--tw-bg-opacity:1;background-color:rgb(244 244 244/var(--tw-bg-opacity,1))}.bg-\\[\\#ff91001a\\]{background-color:#ff91001a}.bg-slate-400{--tw-bg-opacity:1;background-color:rgb(148 163 184/var(--tw-bg-opacity,1))}.bg-transparent{background-color:transparent}.fill-\\[\\#3071a9\\]{fill:#3071a9}.stroke-white{stroke:#fff}.stroke-\\[1\\.5px\\]{stroke-width:1.5px}.p-\\[22px\\]{padding:22px}.p-\\[50px\\]{padding:50px}.p-\\[7px\\]{padding:7px}.px-\\[22px\\]{padding-left:22px;padding-right:22px}.px-\\[8px\\]{padding-left:8px;padding-right:8px}.py-\\[8px\\]{padding-bottom:8px;padding-top:8px}.ps-\\[16px\\]{padding-inline-start:16px}.ps-\\[4px\\]{padding-inline-start:4px}.ps-\\[8px\\]{padding-inline-start:8px}.pt-\\[8px\\]{padding-top:8px}.text-\\[14px\\]{font-size:14px}.text-\\[\\#3071a9\\]{--tw-text-opacity:1;color:rgb(48 113 169/var(--tw-text-opacity,1))}.text-\\[\\#424242\\]{--tw-text-opacity:1;color:rgb(66 66 66/var(--tw-text-opacity,1))}.text-\\[\\#663c00\\]{--tw-text-opacity:1;color:rgb(102 60 0/var(--tw-text-opacity,1))}.text-\\[\\#ff9100\\]{--tw-text-opacity:1;color:rgb(255 145 0/var(--tw-text-opacity,1))}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.text-red-300{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity,1))}.text-transparent{color:transparent}.opacity-50{opacity:.5}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.transition-\\[width\\]{transition-duration:.15s;transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-700{transition-duration:.7s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.hover\\:bg-\\[\\#3071a9\\]:hover{--tw-bg-opacity:1;background-color:rgb(48 113 169/var(--tw-bg-opacity,1))}.hover\\:bg-\\[\\#fff8e1\\]:hover{--tw-bg-opacity:1;background-color:rgb(255 248 225/var(--tw-bg-opacity,1))}.hover\\:bg-red-600:hover{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity,1))}.focus\\:-translate-y-\\[8px\\]:focus{--tw-translate-y:-8px}.focus\\:-translate-y-\\[8px\\]:focus,.focus\\:scale-110:focus{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.focus\\:scale-110:focus{--tw-scale-x:1.1;--tw-scale-y:1.1}.focus\\:border-\\[\\#3071a9\\]:focus{--tw-border-opacity:1;border-color:rgb(48 113 169/var(--tw-border-opacity,1))}.active\\:bg-\\[\\#223f57\\]:active{--tw-bg-opacity:1;background-color:rgb(34 63 87/var(--tw-bg-opacity,1))}.enabled\\:shadow:enabled{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.enabled\\:hover\\:rotate-\\[135deg\\]:hover:enabled{--tw-rotate:135deg}.enabled\\:hover\\:rotate-\\[135deg\\]:hover:enabled,.enabled\\:hover\\:scale-110:hover:enabled{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.enabled\\:hover\\:scale-110:hover:enabled{--tw-scale-x:1.1;--tw-scale-y:1.1}.enabled\\:hover\\:scale-\\[150\\%\\]:hover:enabled{--tw-scale-x:150%;--tw-scale-y:150%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.enabled\\:hover\\:border-\\[\\#27ae5fc1\\]:hover:enabled{border-color:#27ae5fc1}.enabled\\:hover\\:bg-\\[\\#32b267c7\\]:hover:enabled{background-color:#32b267c7}.enabled\\:hover\\:bg-red-200:hover:enabled{--tw-bg-opacity:1;background-color:rgb(254 202 202/var(--tw-bg-opacity,1))}.enabled\\:hover\\:text-red-400:hover:enabled{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity,1))}.disabled\\:opacity-50:disabled{opacity:.5}.peer:checked~.peer-checked\\:border-\\[\\#ff9100\\]{--tw-border-opacity:1;border-color:rgb(255 145 0/var(--tw-border-opacity,1))}.peer:checked~.peer-checked\\:bg-\\[\\#ff9100\\]{--tw-bg-opacity:1;background-color:rgb(255 145 0/var(--tw-bg-opacity,1))}.peer:checked~.peer-checked\\:text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}@media (min-width:768px){.md\\:flex-row{flex-direction:row}}.\\[\\&_circle\\]\\:fill-white circle{fill:#fff}.\\[\\&_div\\]\\:min-w-\\[200px\\] div{min-width:200px}";

const componentTags = {
    vehicleAccessories: 'vehicle-accessories',
    vehicleSpecification: 'vehicle-specification',
    vehiclePaintThickness: 'vehicle-paint-thickness',
    vehicleServiceHistory: 'vehicle-service-history',
    vehicleClaimableItems: 'vehicle-claimable-items',
    vehicleSaleInformation: 'vehicle-sale-information',
    vehicleWarrantyDetails: 'vehicle-warranty-details',
    vehicleSsc: 'vehicle-ssc',
};
const VehicleLookup = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        // #region Localization
        this.language = 'en';
        this.locale = sharedLocalesSchema.getDefault();
        // #endregion
        // #region Wrapper Logic
        this.activeElement = '';
        this.baseUrl = '';
        this.isDev = false;
        this.mockUrl = '';
        this.mockRecaptcha = false;
        this.disableVinValidation = false;
        this.queryString = '';
        this.sscQueryString = '';
        this.separateSsc = false;
        this.hiddenTabs = '';
        this.blazorErrorStateListener = '';
        this.blazorOnLoadingStateChange = '';
        this.blazorDynamicClaimActivate = '';
        this.currentVin = '';
        this.isError = false;
        this.isLoading = false;
        this.searchGeneration = 0;
        this.syncErrorAcrossComponents = (newErrorMessage) => {
            var _a, _b;
            this.isError = true;
            this.errorMessage = ((_b = (_a = this.locale) === null || _a === void 0 ? void 0 : _a.errors) === null || _b === void 0 ? void 0 : _b[newErrorMessage]) || this.locale.errors.wildCard;
            Object.values(this.componentsList).forEach(element => {
                if (element)
                    element.setErrorMessage(newErrorMessage);
            });
        };
        this.loadingStateChangingMiddleware = (newState) => {
            this.isLoading = newState;
            if (this.loadingStateChanged)
                this.loadingStateChanged(newState);
            if (this.blazorRef && this.blazorOnLoadingStateChange)
                this.blazorRef.invokeMethodAsync(this.blazorOnLoadingStateChange, newState);
        };
    }
    async componentWillLoad() {
        await this.changeLanguage(this.language);
    }
    async changeLanguage(newLanguage) {
        const localeResponses = await Promise.all([getLocaleLanguage(newLanguage, 'vehicleLookup', vehicleLookupWrapperSchema), getSharedLocal(newLanguage)]);
        this.locale = localeResponses[1];
    }
    async componentDidLoad() {
        const vehicleAccessories = this.el.shadowRoot.getElementById('vehicle-accessories');
        const vehicleClaim = this.el.shadowRoot.getElementById('vehicle-claimable-items');
        const vehicleHistory = this.el.shadowRoot.getElementById('vehicle-service-history');
        const vehicleDetails = this.el.shadowRoot.getElementById('vehicle-warranty-details');
        const vehicleThickness = this.el.shadowRoot.getElementById('vehicle-paint-thickness');
        const vehicleSpecification = this.el.shadowRoot.getElementById('vehicle-specification');
        const vehicleSaleInformation = this.el.shadowRoot.getElementById('vehicle-sale-information');
        const vehicleSsc = this.separateSsc ? this.el.shadowRoot.getElementById('vehicle-ssc') : null;
        this.componentsList = {
            [componentTags.vehicleClaimableItems]: vehicleClaim,
            [componentTags.vehicleServiceHistory]: vehicleHistory,
            [componentTags.vehicleWarrantyDetails]: vehicleDetails,
            [componentTags.vehicleAccessories]: vehicleAccessories,
            [componentTags.vehiclePaintThickness]: vehicleThickness,
            [componentTags.vehicleSpecification]: vehicleSpecification,
            [componentTags.vehicleSaleInformation]: vehicleSaleInformation,
        };
        if (vehicleSsc) {
            this.componentsList[componentTags.vehicleSsc] = vehicleSsc;
        }
        Object.values(this.componentsList).forEach(element => {
            if (!element)
                return;
            element.errorCallback = this.syncErrorAcrossComponents;
            element.loadingStateChange = this.loadingStateChangingMiddleware;
            element.loadedResponse = newResponse => this.handleLoadData(newResponse, element);
        });
        if (vehicleClaim && this.dynamicClaimActivate) {
            vehicleClaim.activate = this.dynamicClaimActivate;
        }
        if (vehicleClaim) {
            vehicleClaim.activate = vehicleInformation => {
                if (this.blazorRef && this.blazorDynamicClaimActivate) {
                    this.blazorRef.invokeMethodAsync(this.blazorDynamicClaimActivate, vehicleInformation);
                }
            };
        }
        if (this.isDev)
            await this.loadMockData();
    }
    async onIsDevChange(isDev) {
        if (isDev)
            await this.loadMockData();
    }
    async loadMockData() {
        if (!this.componentsList)
            return;
        const mockData = await getMockFile('vehicle-lookup', this.mockUrl);
        Object.values(this.componentsList).forEach(element => {
            if (element)
                element.setMockData(mockData);
        });
    }
    getSscElement() {
        if (this.separateSsc)
            return this.componentsList[componentTags.vehicleSsc] || null;
        return this.componentsList[componentTags.vehicleWarrantyDetails] || null;
    }
    async handleLoadData(newResponse, activeElement) {
        const generation = this.searchGeneration;
        this.isError = false;
        this.errorMessage = '';
        this.currentVin = newResponse.vin || '';
        // Skip distributing to non-active components if a new search has started
        if (generation !== this.searchGeneration)
            return;
        const sscElement = this.sscQueryString ? this.getSscElement() : null;
        // Only clear SSC when we know the search came from a specific non-SSC tab.
        // When activeElement is null (programmatic data injection), distribute to all components.
        const shouldClearSsc = sscElement && activeElement !== null && activeElement !== sscElement;
        Object.values(this.componentsList).forEach(element => {
            if (element === null || element === activeElement || !newResponse)
                return;
            // When sscQueryString is set, clear SSC data on the SSC-showing component
            // if the search was triggered from a non-SSC tab (prevents viewing SSC without logging)
            if (shouldClearSsc && element === sscElement) {
                if (this.separateSsc) {
                    // SSC-only component: reset to empty state
                    element.clearData();
                }
                else {
                    // Combined warranty+SSC: distribute data with SSC stripped
                    element.fetchVin(Object.assign(Object.assign({}, newResponse), { ssc: [], sscLogId: null }));
                }
                return;
            }
            element.fetchVin(newResponse);
        });
    }
    async errorListener(newState) {
        if (this.errorStateListener)
            this.errorStateListener(newState);
        if (this.blazorRef && this.blazorErrorStateListener)
            this.blazorRef.invokeMethodAsync(this.blazorErrorStateListener, newState);
    }
    async setBlazorRef(newBlazorRef) {
        this.blazorRef = newBlazorRef;
    }
    async fetchVin(vin, headers = {}) {
        const activeElement = this.componentsList[this.activeElement] || null;
        this.componentsList[componentTags.vehicleClaimableItems].headers = headers;
        if (!activeElement)
            return;
        this.searchGeneration++;
        activeElement.fetchVin(vin, headers);
    }
    // #endregion
    render() {
        var _a;
        const props = {
            [componentTags.vehicleAccessories]: {},
            [componentTags.vehicleSpecification]: {},
            [componentTags.vehicleClaimableItems]: {},
            [componentTags.vehiclePaintThickness]: {},
            [componentTags.vehicleServiceHistory]: {},
            [componentTags.vehicleWarrantyDetails]: {},
            [componentTags.vehicleSaleInformation]: {},
            [componentTags.vehicleSsc]: {},
        };
        try {
            if (this.childrenProps) {
                let parsedProps = {};
                if (typeof this.childrenProps === 'string')
                    parsedProps = JSON.parse(this.childrenProps);
                else if (typeof this.childrenProps === 'object')
                    parsedProps = this.childrenProps;
                Object.keys(props).forEach(key => {
                    if (typeof parsedProps[key] === 'object')
                        props[key] = parsedProps[key];
                });
            }
        }
        catch (error) {
            console.error(error);
        }
        const hiddenSet = new Set(this.hiddenTabs.split(',').map(t => t.trim()).filter(Boolean));
        if (!Object.values(componentTags).includes(this.activeElement) || hiddenSet.has(this.activeElement))
            return h("div", { class: "w-full h-[200px] text-[26px] text-red-600 flex items-center justify-center" }, "Invalid tag");
        const allComponents = Object.assign(Object.assign({ 'vehicle-specification': (h("vehicle-specification", Object.assign({ coreOnly: true, isDev: this.isDev, disableVinValidation: this.disableVinValidation, "base-url": this.baseUrl, language: this.language, "query-string": this.queryString, id: componentTags.vehicleSpecification }, props[componentTags.vehicleSpecification]))), 'vehicle-accessories': (h("vehicle-accessories", Object.assign({ coreOnly: true, isDev: this.isDev, disableVinValidation: this.disableVinValidation, "base-url": this.baseUrl, language: this.language, "query-string": this.queryString, id: componentTags.vehicleAccessories }, props[componentTags.vehicleAccessories]))), 'vehicle-sale-information': (h("vehicle-sale-information", Object.assign({ coreOnly: true, isDev: this.isDev, disableVinValidation: this.disableVinValidation, "base-url": this.baseUrl, language: this.language, "query-string": this.queryString, id: componentTags.vehicleSaleInformation }, props[componentTags.vehicleSaleInformation]))), 'vehicle-warranty-details': (h("vehicle-warranty-details", Object.assign({ coreOnly: true, "show-ssc": !this.separateSsc, isDev: this.isDev, mockRecaptcha: this.mockRecaptcha, disableVinValidation: this.disableVinValidation, "show-warranty": "true", "base-url": this.baseUrl, language: this.language, "query-string": !this.separateSsc && this.sscQueryString ? [this.queryString, this.sscQueryString].filter(Boolean).join('&') : this.queryString, id: componentTags.vehicleWarrantyDetails }, props[componentTags.vehicleWarrantyDetails]))) }, (this.separateSsc
            ? {
                'vehicle-ssc': (h("vehicle-warranty-details", Object.assign({ coreOnly: true, "show-ssc": "true", isDev: this.isDev, mockRecaptcha: this.mockRecaptcha, disableVinValidation: this.disableVinValidation, "show-warranty": "false", "base-url": this.baseUrl, language: this.language, "query-string": [this.queryString, this.sscQueryString].filter(Boolean).join('&'), id: componentTags.vehicleSsc }, props[componentTags.vehicleSsc]))),
            }
            : {})), { 'vehicle-service-history': (h("vehicle-service-history", Object.assign({ coreOnly: true, isDev: this.isDev, disableVinValidation: this.disableVinValidation, "base-url": this.baseUrl, language: this.language, "query-string": this.queryString, id: componentTags.vehicleServiceHistory }, props[componentTags.vehicleServiceHistory]))), 'vehicle-paint-thickness': (h("vehicle-paint-thickness", Object.assign({ coreOnly: true, isDev: this.isDev, disableVinValidation: this.disableVinValidation, "base-url": this.baseUrl, language: this.language, "query-string": this.queryString, id: componentTags.vehiclePaintThickness }, props[componentTags.vehiclePaintThickness]))), 'vehicle-claimable-items': (h("vehicle-claimable-items", Object.assign({ coreOnly: true, isDev: this.isDev, disableVinValidation: this.disableVinValidation, "base-url": this.baseUrl, language: this.language, "query-string": this.queryString, id: componentTags.vehicleClaimableItems }, props[componentTags.vehicleClaimableItems]))) });
        const componentList = Object.fromEntries(Object.entries(allComponents).filter(([key]) => !hiddenSet.has(key)));
        const claimableProps = props[componentTags.vehicleClaimableItems];
        const showClaimableTrace = this.activeElement === componentTags.vehicleClaimableItems &&
            !!((_a = claimableProps === null || claimableProps === void 0 ? void 0 : claimableProps.showTrace) !== null && _a !== void 0 ? _a : claimableProps === null || claimableProps === void 0 ? void 0 : claimableProps['show-trace']) &&
            !!this.currentVin &&
            !this.isError &&
            !this.isLoading;
        return (h(Host, { translate: "no" }, h(VehicleInfoLayout, { isError: this.isError, header: this.currentVin, isLoading: this.isLoading, direction: this.locale.direction, errorMessage: this.errorMessage || this.locale.errors.wildCard, headerRight: showClaimableTrace ? (h("button", { type: "button", class: "trace-trigger-button", title: "View Lookup Trace", "aria-label": "View Lookup Trace", onClick: () => { var _a, _b; return (_b = (_a = this.componentsList) === null || _a === void 0 ? void 0 : _a[componentTags.vehicleClaimableItems]) === null || _b === void 0 ? void 0 : _b.openTrace(); } }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("circle", { cx: "6", cy: "19", r: "3" }), h("path", { d: "M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15" }), h("circle", { cx: "18", cy: "5", r: "3" })))) : null }, h("shift-tab-content", { components: componentList, activeComponent: this.activeElement }))));
    }
    get el() { return getElement(this); }
    static get watchers() { return {
        "language": ["changeLanguage"],
        "isDev": ["onIsDevChange"],
        "errorMessage": ["errorListener"]
    }; }
};
VehicleLookup.style = vehicleLookupCss;

export { VehicleLookup as vehicle_lookup };
