1"use strict";(self.webpackChunkmy_app=self.webpackChunkmy_app||[]).push([[5276],{55276:(e,t,a)=>{a.r(t),a.d(t,{default:()=>g});var i=a(7124),n=a(21407),s=a(34491),o=a(93615),l=a(40056),r=a(47313),d=a(24655),c=a.n(d),u=a(72747),h=a(21484),p=a(53084),v=a(46417);const g=()=>{const[e,t]=(0,r.useState)({checkin:"",checkout:""}),[a,d]=(0,r.useState)(""),[g,x]=(0,r.useState)(),[k,C]=(0,r.useState)(""),[j,S]=(0,r.useState)("+91"),[y,b]=(0,r.useState)(""),[f,E]=(0,r.useState)(""),[N,w]=(0,r.useState)(!1),[O,A]=(0,r.useState)(!1),[L,_]=(0,r.useState)(!1),I=(0,l.useMutation)((()=>{let t={LISTING_ID:null===g||void 0===g?void 0:g.id,CHECKIN:e.checkin,CHECKOUT:e.checkout,QUERY:a,PAGE_SOURCE:"TRAVEL AGENT",FULL_NAME:k,MOBILE_NUMBER:y,CC_MOBILE_NUMBER:j,EMAIL_ID:f,UTM:"TA Page"};return(0,o.be)({method:"POST",maxBodyLength:1/0,url:"https://ecapi.saffronstays.com/recordGuestQuery",headers:{"Content-Type":"application/json",Authorization:"Bearer "+localStorage.getItem("token")},data:t})}),{onError:e=>{s.Am.error(e.response.data.error,{position:window.innerWidth<800?"top-right":"bottom-right",autoClose:2e3,hideProgressBar:!1,icon:!0,closeOnClick:!1,pauseOnHover:!1,draggable:!1,progress:void 0})},onSuccess:e=>{s.Am.success(e.data.data,{position:window.innerWidth<800?"top-right":"bottom-right",autoClose:3e3,hideProgressBar:!1,icon:!0,closeOnClick:!1,pauseOnHover:!1,draggable:!1,progress:void 0}),d(""),w(!0)}});return(0,r.useEffect)((()=>{e.checkin&&e.checkout&&_(!1)}),[e]),(0,v.jsxs)("div",{className:"ta-wrapper",children:[(0,v.jsx)(n.NavbarAndSidebar,{}),N?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(u.r,{id:"green-tick"}),(0,v.jsx)("h2",{children:"Thank you for your query. We will contact you soon."})]}):(0,v.jsxs)("div",{className:"ta-container",children:[(0,v.jsx)("h3",{children:"Welcome Travel Agents"}),(0,v.jsx)("p",{children:"Fill the details"}),(0,v.jsxs)("form",{onSubmit:e=>{e.preventDefault()},children:[(0,v.jsx)("input",{value:k,className:"ask-me-input",placeholder:"Full Name *",onChange:e=>{C(e.target.value)}}),(0,v.jsx)(c(),{country:"in",value:j+y,enableSearch:!0,isValid:(e,t)=>"91"!==(null===t||void 0===t?void 0:t.countryCode)||"91"===(null===t||void 0===t?void 0:t.countryCode)&&12===e.length?(A(!0),!0):(A(!1),!1),onChange:(e,t,a,i)=>{var n,s;S((null===t||void 0===t?void 0:t.dialCode)||""),b(e.slice((null===t||void 0===t||null===(n=t.dialCode)||void 0===n||null===(s=n.toString())||void 0===s?void 0:s.length)||""))}}),(0,v.jsx)("input",{value:f,className:"ask-me-input",placeholder:"Email",onChange:e=>{E(e.target.value)}}),(0,v.jsx)(m,{value:g,onChange:e=>{x(e)}}),(0,v.jsxs)("div",{className:"input-wrapper",children:[(0,v.jsx)("input",{id:"checkin",onClick:()=>{_(!0)},value:null!==e&&void 0!==e&&e.checkin?(0,p.mB)(e.checkin):"Check In",readOnly:!0}),(0,v.jsx)("input",{id:"checkout",onClick:()=>{_(!0)},value:null!==e&&void 0!==e&&e.checkout?(0,p.mB)(e.checkout):"Check Out",readOnly:!0}),(0,v.jsx)(h.M,{dates:e,open:L,setOpen:_,setDates:t,sameDay:0,noMonth:window.innerWidth<800?1:2,style:{zIndex:"10",top:"40px",left:"0"}})]}),(0,v.jsx)("textarea",{placeholder:"Enter your question",value:a,onChange:e=>d(e.target.value)}),(0,v.jsx)("div",{className:"btn-wrapper",children:(0,v.jsx)("button",{className:"blue-btn "+(I.isLoading?"button__loader":""),disabled:!k||!(y&&O)||!a||!(null!==g&&void 0!==g&&g.id)||I.isLoading,onClick:()=>I.mutateAsync(),children:I.isLoading?"Loading...":"Submit"})})]})]}),(0,v.jsx)(i.default,{})]})},m=e=>{let{value:t,onChange:a}=e;const[i,n]=(0,r.useState)(null===t||void 0===t?void 0:t.title),[s,l]=(0,r.useState)([]),[d,c]=(0,r.useState)(!1),u=(0,r.useCallback)((async e=>{try{l([]);const t=await(0,o.cV)(`/auto-complete?text=${e}&type=listing`);t.data.data&&(l(t.data.data),c(!0))}catch(t){l([]),c(!1)}}),[]);return(0,r.useEffect)((()=>{n(null===t||void 0===t?void 0:t.title)}),[t]),(0,v.jsxs)("div",{className:"villa-select-wrapper",children:[(0,v.jsxs)("div",{children:[" ",(0,v.jsx)("input",{placeholder:"Search for villa",value:i,onChange:e=>{n(e.target.value),u(e.target.value)}})]}),d&&(0,v.jsx)("div",{className:"villa-options-wrapper",children:null===s||void 0===s?void 0:s.map((e=>(0,v.jsxs)("div",{className:"villa-options",onClick:()=>{a(e),l([]),c(!1)},children:[(0,v.jsx)("img",{src:"https://ik.imagekit.io/5tgxhsqev/saffronstays-media/tr:w-100,h-auto,q-30,f-webp/image/upload/"+e.image_id,alt:""})," ",e.title]})))})]})}}}]);
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.