<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">import{r as l,a as o,j as e,R as m}from"./app-1afd442e.js";import{c as N,Q as f,H as y}from"./Header-caf7408e.js";import{_ as p}from"./lodash-ec4b5e6f.js";import{S}from"./SelectWrapper-2f059b34.js";import"./react-select.esm-0d311467.js";const d="/app/packages",h=t=&gt;encodeURI(`${d}?city=${t}`),k=t=&gt;{const[s,r]=l.useState(!1),c=i=&gt;o("li",{className:"tour-pack-city-name",children:[e("i",{className:"fa-solid fa-caret-right pe-2"}),e("a",{href:h(i.cityName),children:i.cityName})]},i._id);return o(m.Fragment,{children:[e("b",{role:"button",className:"country-name",children:e("a",{href:`${d}?country=${t.countryName}`,children:t.countryName})}),t.cities.slice(0,3).map(i=&gt;c(i)),s&amp;&amp;e(m.Fragment,{children:t.cities.slice(3,t.cities.length).map(i=&gt;c(i))}),t.cities.length&gt;3&amp;&amp;e("span",{className:"show-button",onClick:()=&gt;r(i=&gt;!i),children:s?"- Show Less":"+ Show More"})]})},v=t=&gt;{const[s,r]=l.useState([]),[c,i]=l.useState({}),u=async()=&gt;{t.setLoading(!0);try{const a=await N({url:"/api/master/getPackageCities",method:"POST",headers:{"site-id":t.siteId}});if(a.data.cities){const n=p.groupBy(a.data.cities,"countryName");r(a.data.cities),i(n)}}catch(a){f.error((a==null?void 0:a.message)||"Unable to get cities.")}t.setLoading(!1)};return l.useEffect(()=&gt;{u()},[]),o("div",{children:[o("div",{className:"row d-flex align-items-baseline",children:[e("div",{className:"col-lg-4 col-md-5 col-sm-12 col-12",children:e(S,{options:s==null?void 0:s.map((a,n)=&gt;({label:`${a.cityName} (${a.countryName})`,value:a._id})),onChange:a=&gt;{const n=s.find(g=&gt;g._id===a.value);n&amp;&amp;(window.location.href=h(n.cityName))}})}),e("div",{className:"col-lg-4 col-md-5 col-sm-12 col-12",children:e("a",{className:"show-all-btn",href:d,children:"Show All Packages"})})]}),e("div",{className:"country-list",children:e("div",{className:"row",children:Object.keys(c).map((a,n)=&gt;e("div",{className:"col-lg-3 col-md-4 col-sm-6 col-6 my-3",children:e(k,{cities:c[a],countryName:a})},a))})})]})},$=t=&gt;{const[s,r]=l.useState(!1);return e(y,{siteData:t.siteData,children:e("div",{id:"tour-package-tab",children:o("div",{className:"container p-4",children:[o("div",{className:"module-name",children:[e("h5",{className:"after-heading",children:"Tour Packages"}),e("p",{children:"Find out more about the tour packages you can do in the famous cities"})]}),e("div",{className:"row",children:e(v,{loading:s,setLoading:c=&gt;r(c),siteId:t.siteData._id})})]})})})};export{$ as default};
</pre></body></html>