1import{h as e}from"./BSvvKGqq.js";import{o as t}from"./Cnu0k-Zl.js";import{D as n,E as r,On as i,Yt as a,Zn as o,_ as s,b as c,bt as l,g as u,k as d,mt as f,o as p,tr as m,un as h,v as g,vn as _,y as v}from"./Car86Ubo.js";import{dt as y,mt as b,ut as x}from"./QdjmqAoI.js";import{n as S,t as C}from"./CATM49-w.js";import{t as w}from"./Blf4Mq93.js";import{t as T}from"./BBstXnwD.js";import{t as E}from"./BdsnLJRd.js";import{i as D,r as O}from"./8r0MVUiZ.js";var k={class:`mt-3 flex flex-col`},A={class:`mb-1 text-base font-semibold text-slate-500 capitalize`},j={key:0,class:`flex items-center justify-between`},M={class:`text-sm font-medium`},N={class:`hidden items-center gap-x-2 rounded-md sm:flex`},P=[`value`],F={key:1,class:`mt-2 flex list-none flex-col gap-y-5`},I={key:2,role:`status`,class:`flex items-center justify-center py-12`},L={key:3,class:`px-6 py-14 text-center text-[15px] sm:px-14`},R=Object.assign(d({__name:`BrowseList`,props:{resultsQuery:{},data:{},isLoading:{type:Boolean},sort:{},packages:{},baseUrlKTO:{}},setup(t){let{resultsQuery:r,data:o,isLoading:d,sort:_,packages:y}=e(t),b=u(()=>o.value.every(e=>e.type===`package`)),S=[{label:`Relevance`,sort:`is_paid_client`},{label:`Lowest Price`,sort:`price`},{label:`Highest Price`,sort:`-price`},{label:`Shortest Duration`,sort:`duration`},{label:`Longest Duration`,sort:`-duration`}];return(e,u)=>{let C=D,T=O,E=w;return f(),c(`div`,k,[s(`p`,A,` Showing search results for `+m(i(r)?`"${i(r)}"`:`popular destinations`),1),i(b)?(f(),c(`div`,j,[s(`p`,M,m(i(y))+` Tour Packages`,1),s(`div`,N,[u[1]||=s(`label`,{class:`hidden self-center py-2 pl-4 text-sm font-medium md:inline`,for:`sort`},` Sort: `,-1),a(s(`select`,{"onUpdate:modelValue":u[0]||=e=>h(_)?_.value=e:null,class:`cursor-pointer rounded-md border border-slate-200 text-sm outline-hidden`,id:`sort`},[(f(),c(p,null,l(S,e=>s(`option`,{value:e.sort},m(e.label),9,P)),64))],512),[[x,i(_)]])])])):v(``,!0),i(d)?(f(),c(`div`,I,[n(E,{name:`svg-spinners:180-ring-with-bg`,class:`mr-2 h-16 w-16 animate-spin fill-blue-600 text-gray-200`}),u[2]||=s(`span`,{class:`sr-only`},`Loading...`,-1)])):(f(),c(`ul`,F,[(f(!0),c(p,null,l(i(o),e=>(f(),c(p,null,[e.type===`package`?(f(),g(C,{key:`package-${e.id}`,package:e,"base-url-k-t-o":t.baseUrlKTO},null,8,[`package`,`base-url-k-t-o`])):e.type===`promotion`?(f(),g(T,{key:`promotion-${e.id}`,promotion:e,"base-url-k-t-o":t.baseUrlKTO},null,8,[`promotion`,`base-url-k-t-o`])):v(``,!0)],64))),256))])),i(o).length===0&&!i(d)?(f(),c(`div`,L,[...u[3]||=[s(`p`,{class:`font-semibold text-gray-900`},`No results found`,-1),s(`p`,{class:`mt-2 text-gray-500`},`Try searching for something else.`,-1)]])):v(``,!0)])}}}),{__name:`BrowseList`}),z={class:`col-span-1`},B={class:`flex flex-col gap-y-3 rounded-md bg-gray-100 px-4 py-3 shadow-sm`},V={key:0,class:`mt-2 text-sm text-red-600`},H={key:0,class:`mt-2 text-sm text-red-600`},U={key:0,class:`mt-2 text-sm text-red-600`},W={key:0,class:`mt-2 text-sm text-red-600`},G=[`disabled`],K={key:0,class:`flex`},q=Object.assign(d({__name:`BrowseInquiry`,setup(e){let{notify:n}=T(),{openModal:i}=E(),l={name:``,contact_number:``,email:``,number_of_adults:0,number_of_children:0,number_of_infants:0,notes:``},u=_({}),d=_({...l}),p=_(!1);async function h(){p.value=!0;try{let e=t();await C(`/api/inquiries`,{method:`POST`,baseURL:e.public.apiUrl,headers:{Accept:`application/json`},body:{name:d.value.name,contact_number:d.value.contact_number,email:d.value.email,number_of_adults:d.value.number_of_adults,number_of_children:d.value.number_of_children,number_of_infants:d.value.number_of_infants,notes:d.value.notes,travel_agency_id:null,package_ids:[]}}),i(),Object.assign(d.value,l),u.value={}}catch(e){e instanceof S&&e.statusCode===422?u.value=e.data.errors:n({type:`error`,title:`Error`,message:`Something went wrong. Please try again later.`})}finally{p.value=!1}}return(e,t)=>(f(),c(`div`,z,[t[7]||=s(`div`,{class:`mb-5 flex justify-center`},null,-1),s(`div`,B,[t[5]||=s(`p`,{class:`text-base font-medium italic`},`Can't find what you're searching for?`,-1),t[6]||=s(`p`,{class:`text-xs`},` Submit your enquiry below and we will send your request to the relevant trusted partner of TripZilla. `,-1),s(`form`,{class:`flex flex-col gap-y-3`,onSubmit:b(h,[`prevent`])},[s(`div`,null,[a(s(`input`,{class:`w-full rounded border-slate-400 text-sm shadow-md placeholder:text-xs`,type:`text`,name:`name`,id:`name`,placeholder:`Your Name`,"onUpdate:modelValue":t[0]||=e=>d.value.name=e},null,512),[[y,d.value.name]]),u.value.name?(f(),c(`div`,V,m(u.value.name[0]),1)):v(``,!0)]),s(`div`,null,[a(s(`input`,{class:`w-full rounded border-slate-400 text-sm shadow-md placeholder:text-xs`,type:`email`,name:`email`,id:`email`,placeholder:`Your Email`,"onUpdate:modelValue":t[1]||=e=>d.value.email=e},null,512),[[y,d.value.email]]),u.value.email?(f(),c(`div`,H,m(u.value.email[0]),1)):v(``,!0)]),s(`div`,null,[a(s(`input`,{class:`w-full rounded border-slate-400 text-sm shadow-md placeholder:text-xs`,type:`text`,name:`contact`,id:`contact`,placeholder:`Your Phone Number`,"onUpdate:modelValue":t[2]||=e=>d.value.contact_number=e},null,512),[[y,d.value.contact_number]]),u.value.contact_number?(f(),c(`div`,U,m(u.value.contact_number[0]),1)):v(``,!0)]),a(s(`textarea`,{class:`rounded border-slate-400 text-sm shadow-md placeholder:text-xs`,placeholder:`Specify your request here...`,name:`notes`,id:`notes`,cols:`30`,rows:`3`,"onUpdate:modelValue":t[3]||=e=>d.value.notes=e},null,512),[[y,d.value.notes]]),u.value.notes?(f(),c(`div`,W,m(u.value.notes[0]),1)):v(``,!0),s(`button`,{id:`submit`,type:`submit`,disabled:p.value,class:o([{"bg-blue-400":p.value},`flex items-center justify-center rounded bg-blue-500 py-2 font-medium text-white shadow-md`])},[p.value?(f(),c(`span`,K,[...t[4]||=[s(`svg`,{class:`mr-3 h-5 w-5 animate-spin text-white`,xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`},[s(`circle`,{class:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,"stroke-width":`4`}),s(`path`,{class:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z`})],-1)]])):v(``,!0),r(` `+m(p.value?`Sending Enquiry`:`Send General Enquiry`),1)],10,G)],32)])]))}}),{__name:`BrowseInquiry`});export{R as n,q 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.