1import{$r as e,Ci as t,Rr as n,Ti as r,en as i,ii as a,mt as o,r as s,ti as c,vt as l}from"./I18nContext-D1VgHctP.js";import{n as u,r as d,t as f}from"./UrqlBaseQuery-JZg2VoLh.js";import{l as p}from"./DtaIntegration-CjahP4dB.js";import{t as m}from"./DateWithoutTimeFormatter-CAe0wWuw.js";var h=t();await r(`react`);var g=({children:e,color:t,id:n})=>(0,h.jsx)(`span`,{id:n,style:{fontSize:`2rem`,fontFamily:`Stena Sans`,fontWeight:700,lineHeight:`3rem`,color:t},children:e}),_=(e,t,n,r)=>{let i=e.length,a=e=>m(e,new Date,t);return i===0?n:i===1?a(e[0]?.departureDate):i===2?`${a(e[0].departureDate)} - ${a(e[1].departureDate)}`:`${i} ${r}`};await r(`react`);var{useMemo:v}=await r(`react`),y=o(` 2 query BookingSummaryRoundTrip( 3 $sailingId: ID! 4 $salesOwnerId: ID! 5 $languageId: ID! 6 ) { 7 sailings { 8 byId(id: $sailingId) { 9 id 10 departureDate 11 route { 12 id 13 departureCity( 14 salesOwnerId: $salesOwnerId 15 currentSalesChannelCode: "PIB" 16 ) { 17 id 18 translations( 19 salesOwnerId: $salesOwnerId 20 languageId: $languageId 21 currentSalesChannelCode: "PIB" 22 ) { 23 id 24 name 25 } 26 } 27 arrivalCity( 28 salesOwnerId: $salesOwnerId 29 currentSalesChannelCode: "PIB" 30 ) { 31 id 32 translations( 33 salesOwnerId: $salesOwnerId 34 languageId: $languageId 35 currentSalesChannelCode: "PIB" 36 ) { 37 id 38 name 39 } 40 } 41 } 42 } 43 } 44 } 45`),b=({salesOwnerId:t,languageId:r,localeId:o,outwardSailingId:u,homewardSailingId:d,arrowIcon:f,iconAriaLabel:p})=>{let m=s(),[{fetching:b,stale:x,data:S,error:C}]=l({query:y,variables:{salesOwnerId:t,languageId:r,sailingId:u},requestPolicy:`network-only`}),[{fetching:w,stale:T,data:E}]=l({query:y,variables:{salesOwnerId:t,languageId:r,sailingId:d},requestPolicy:`network-only`}),D=S?.sailings.byId,O=E?.sailings.byId,k=v(()=>_([D,O].filter(e=>e!=null),o,m(`ManageBookingOverview.NoDeparture`),m(`ManageBookingOverview.Departures`)),[m,O,o,D]);return b||w||x||T?(0,h.jsxs)(a,{gap:2,children:[(0,h.jsx)(i,{height:`30px`,width:`100px`,borderRadius:16}),(0,h.jsx)(i,{height:`24px`,width:`50px`,borderRadius:16})]}):C||!D?(0,h.jsx)(e,{children:m(`BookingSummary.NoSailingFound`)}):(0,h.jsxs)(a,{children:[(0,h.jsxs)(c,{gap:1,flexWrap:`wrap`,children:[(0,h.jsx)(g,{children:D.route.departureCity.translations.name}),(0,h.jsx)(`span`,{className:`sr-only`,children:p}),(0,h.jsx)(n,{icon:f,size:20}),(0,h.jsx)(g,{children:D.route.arrivalCity.translations.name})]}),(0,h.jsx)(e,{children:k})]})},x=o(` 46 query CabinCategoryByIdApi($cabinCategoryId: ID!) { 47 cabinCategory { 48 byId(cabinCategoryId: $cabinCategoryId) { 49 ...CabinCategoryApi_CabinCategory 50 } 51 } 52 } 53`),S=o(` 54 query CabinCategoryByIdsApi($cabinCategoryIds: [String!]!) { 55 cabinCategory { 56 byIds(cabinCategoryIds: $cabinCategoryIds) { 57 ...CabinCategoryApi_CabinCategory 58 } 59 } 60 } 61`),C=o(` 62 fragment CabinCategoryApi_CabinCategory on CabinCategory { 63 id 64 code 65 cabinGroup { 66 id 67 isPetCabin 68 isSeat 69 isSharedCabin 70 } 71 } 72`),w=e=>`${e}`,T=u({reducerPath:`cabinCategoryApi`,baseQuery:f(d),tagTypes:[`CabinCategory`],endpoints:e=>({getCabinCategoryById:e.query({query:e=>({document:x,variables:e,kind:`query`,requestPolicy:`network-only`}),transformResponse:e=>p(C,e.cabinCategory.byId)??void 0,providesTags:e=>e==null?[]:[{type:`CabinCategory`,id:w(e.id)}]}),getCabinCategoriesByIds:e.query({query:e=>({document:S,variables:e,kind:`query`,requestPolicy:`network-only`}),transformResponse:e=>p(C,e.cabinCategory.byIds??[]),providesTags:e=>e==null?[]:e.map(e=>({type:`CabinCategory`,id:w(e.id)}))})})}),{useGetCabinCategoryByIdQuery:E,useGetCabinCategoriesByIdsQuery:D}=T,O=T.reducer,k=T.middleware,A=T.reducerPath;export{b as a,D as i,O as n,g as o,A as r,k as t};
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.