1import{j as e}from"./chunk-Cl_8PWDN.js";import{P as m}from"./chunk-Bb428ii-.js";import{u as d}from"./chunk-SYSo_Y1B.js";import{u as p}from"./chunk-dqmwzDg7.js";import{f as x}from"./chunk-Bzo9Tunx.js";import"./index-5yA9CUzc.js";import"./chunk-BeHpvERE.js";import"./chunk-DaCLkmJg.js";import"./chunk-BNWfZVZZ.js";import"./chunk-mAyixyGg.js";import"./chunk-PeZDclay.js";function u(r){return r?new Date(r+"T00:00:00").toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):""}function h(r,o){if(!r)return"â";const s=parseFloat(r);return Number.isFinite(s)?new Intl.NumberFormat("en-US",{style:"currency",currency:o}).format(s):r}function P(){const r=d(),{tripShortCode:o}=x(),{data:s,isLoading:c}=p(o);if(c||!s)return e.jsx("div",{className:"min-h-[380px] flex items-center justify-center px-6",children:e.jsxs("div",{className:"text-center max-w-[460px]",children:[e.jsx("div",{"aria-hidden":!0,className:"text-[14px] tracking-[0.7em] text-[color:var(--portal-line)] mb-5",children:"· · ·"}),e.jsx("p",{className:"portal-ed-state-line",children:"Pulling your quotes."})]})});const n=(s.options??[]).flatMap(i=>{const a=i.quote_alternatives?.flatMap(l=>l.quotes.map(t=>({key:t.quote_id,option:i,display:t.display,legacy:null})))??[];return a.length?a:i.visible_quotes.map(l=>({key:l.id,option:i,display:null,legacy:l}))});return e.jsxs("section",{className:"max-w-[720px] mx-auto px-6 sm:px-0 pt-8 pb-16",children:[e.jsxs("div",{className:"portal-ed-kicker",children:["Quotes · ",s?.name??"Your trip"]}),e.jsx("h1",{className:"text-[40px] leading-[1.05] tracking-[-0.018em] text-[color:var(--portal-ink)] mt-2 font-normal",children:"Side-by-side"}),e.jsxs("p",{className:"portal-ed-italic-meta mt-1",children:[n.length," quote",n.length===1?"":"s"," from your advisor."]}),e.jsx("hr",{className:"portal-ed-rule"}),n.length===0?e.jsx("div",{className:"min-h-[380px] flex items-center justify-center px-6",children:e.jsxs("div",{className:"text-center max-w-[460px]",children:[e.jsx("p",{className:"portal-ed-state-line",children:"No quotes yet."}),e.jsx("p",{className:"portal-ed-state-sub mt-2",children:"Your advisor will share quotes here once they're ready."})]})}):e.jsx("ul",{children:n.map(({option:i,display:a,key:l,legacy:t})=>e.jsxs("li",{className:"grid grid-cols-[1fr_auto] gap-6 py-5 portal-ed-row-divider items-baseline",children:[e.jsx("div",{children:a?e.jsx(m,{display:a}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"portal-ed-kicker",children:[t?.cruise_line," · ",t?.cruise_ship]}),e.jsx("div",{className:"text-[20px] leading-[1.15] text-[color:var(--portal-ink)] mt-1 font-normal",children:i.name}),e.jsxs("div",{className:"portal-ed-italic-meta mt-1",children:[u(t?.departure_date)," · ",t?.nights," nights"]})]})}),!a&&t?e.jsxs("div",{className:"text-right",children:[e.jsx("div",{className:"text-[22px] tabular-nums tracking-[-0.008em] text-[color:var(--portal-ink)] font-normal",children:h(t.total_price,t.currency)}),e.jsx("div",{className:"portal-ed-italic-meta text-[12.5px] mt-1",children:t.offer_short_code?"Verified total":"Supplier quote"}),t.offer_short_code?r?e.jsx("span",{className:"mt-2 inline-block text-[12.5px] text-[color:var(--portal-ink-55)]",children:"Quote link disabled"}):e.jsx("a",{href:`/offer/${t.offer_short_code}`,className:"portal-link-quiet portal-focus mt-2 inline-block text-[12.5px]",children:"View quote"}):null]}):null]},l))})]})}export{P as QuotesTab};
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.