"use strict";(self.webpackChunkhhgHealthCareV1=self.webpackChunkhhgHealthCareV1||[]).push([[4263],{98460:function(e,n,t){var o,i=t(73884);function r(){return r=Object.assign?Object.assign.bind():function(e){for(var n=1;n=3?t:""}),"GET",{headers:{accept:"application/json, text/plain, version=2.0.0"}})]:[2]}))}));return function(n,t,o){return e.apply(this,arguments)}}(),z=function(){var e=(0,a.A)((function(e,n,t){return(0,d.__generator)(this,(function(o){return[2,(0,w.px)((0,w.er)(b.R.GET_DOCTOR_SCHEDULE,{id:String((null===t||void 0===t?void 0:t.value)||(null===t||void 0===t?void 0:t.id)),startDate:Me(e),endDate:Me(n)}),"GET")]}))}));return function(n,t,o){return e.apply(this,arguments)}}(),P=function(){var e=(0,a.A)((function(e,n){return(0,d.__generator)(this,(function(t){return[2,(0,w.px)((0,w.er)(b.R.GET_DOCTOR_SCHEDULE,{id:String((null===n||void 0===n?void 0:n.value)||(null===n||void 0===n?void 0:n.id)),startDate:Me(e)}),"GET")]}))}));return function(n,t){return e.apply(this,arguments)}}(),V=function(){var e=(0,a.A)((function(e,n,t){return(0,d.__generator)(this,(function(o){return[2,(0,w.px)((0,w.er)(b.R.GET_TELEMEDICINE_DOCTOR_SCHEDULE,{id:String((null===t||void 0===t?void 0:t.value)||(null===t||void 0===t?void 0:t.id)),startDate:Me(e),endDate:Me(n)}),"GET")]}))}));return function(n,t,o){return e.apply(this,arguments)}}(),H=function(){var e=(0,a.A)((function(e,n){return(0,d.__generator)(this,(function(t){return[2,(0,w.px)((0,w.er)(b.R.GET_TELEMEDICINE_DOCTOR_SCHEDULE,{id:String((null===n||void 0===n?void 0:n.value)||(null===n||void 0===n?void 0:n.id)),startDate:Me(e)}),"GET")]}))}));return function(n,t){return e.apply(this,arguments)}}(),U=t(6442),G=t(79020),j=function(e){var n=e.name,t=e.price,o=e.priceTo,r=e.priceType,a=e.isDetail,c=e.isShowPrice,l=void 0===c||c,d=(0,U.A)().formatMessage,s=(0,M.useRouter)().locale,f=void 0===s?"en-PH":s,h=(0,u.useMemo)((function(){return r===L.vne.RANGE?d({id:"admin.doctor.servicePrice.range",defaultMessage:"Range"}):r===L.vne.STARTING?d({id:"admin.doctor.servicePrice.start",defaultMessage:"Starting from"}):d({id:"admin.doctor.servicePrice.fixed",defaultMessage:"Fixed Price"})}),[r]);return(0,i.FD)(G.d2,{children:[(0,i.Y)(p.T,{size:"sm",type:"regular",className:a?"option-name":"",children:n}),l&&(0,i.FD)(G.Tm,{children:[(0,i.Y)("div",{className:"icon-price hospital-card-icon",children:(0,i.Y)("img",{src:"".concat(L.JpE,"/svg/price-green.svg"),alt:"Price"})}),(0,i.FD)("div",{className:"text-price",children:[(0,i.FD)(p.T,{size:"c2",color:v.w.colors.green600,children:[h,"\xa0"]}),(0,i.FD)(p.T,{size:"c2",color:v.w.colors.green600,children:[(0,w.UN)(parseInt(t),f),o&&" - ".concat((0,w.UN)(parseInt(o),f))]})]})]})]})},Q=function(e){var n=e.date,t=e.startDate,r=e.endDate,l=e.isReset,s=e.isTeleMedicine,p=e.selectedSpecialty,v=e.selectedHospital,f=e.selectedDoctor,h=e.searchDoctorKeyword,g=(0,u.useState)(!1),m=g[0],b=g[1],w=(0,u.useState)([]),y=w[0],x=w[1],C=(0,u.useMemo)((function(){return y.map((function(e){return(0,c.A)((0,o.A)({},e),{value:e.id,label:(0,i.Y)(j,{name:e.name,price:e.price,priceTo:e.priceTo||"",priceType:e.priceType,priceUnit:e.priceUnit,isShowPrice:!(null===e||void 0===e?void 0:e.isSiloam)&&Number(e.price)>0}),icon:(0,i.Y)("img",{src:e.avatar,alt:e.slug})})}))}),[y]),A=(0,u.useMemo)((function(){return y.find((function(e){return e.id===(null===f||void 0===f?void 0:f.value)}))}),[y,f]),E=function(e){var n=e.date,t=e.startDate,i=e.endDate,r=e.isReset,l=e.isTeleMedicine,s=e.selectedDoctor,p=e.selectedSpecialty,v=e.doctorList,f=e.bufferTime,h=void 0===f?0:f,g=(0,u.useState)(!1),m=g[0],b=g[1],w=(0,u.useState)(null),y=w[0],x=w[1],C=(0,u.useState)(null),A=C[0],E=C[1],D=(0,u.useMemo)((function(){return(null===A||void 0===A?void 0:A.length)?k({start:new Date,end:(0,F.A)(new Date(A[0].workingDay),1)}).map((function(e){var n,t=Me(e),o=(null===(n=null===A||void 0===A?void 0:A.find((function(e){return e.workingDay===t})))||void 0===n?void 0:n.slots)||0;if(!o||0===o)return e})):[]}),[A]);(0,u.useEffect)((function(){x(null)}),[null===p||void 0===p?void 0:p.id]);var T=(0,u.useCallback)((function(){x(null)}),[]),S=(0,u.useCallback)((function(e){b(e)}),[]),M=(0,u.useMemo)((function(){var e;return null===(e=null===y||void 0===y?void 0:y.find((function(e){return e.workingDay===Me(n)})))||void 0===e?void 0:e.workingTimes}),[y,n]);return(0,u.useEffect)((function(){if(r)x(null);else if(null===s||void 0===s?void 0:s.value){var e=l?[V(t,i,s),H(t,s)]:[z(t,i,s),P(t,s)];!function(){n.apply(this,arguments)}()}else T();function n(){return n=(0,a.A)((function(){var n,t,i,r,a,l;return(0,d.__generator)(this,(function(d){switch(d.label){case 0:return b(!0),[4,Promise.all(e)];case 1:return t=N.A.apply(void 0,[d.sent(),2]),i=t[0],(null===(r=t[1])||void 0===r?void 0:r._data)&&E(r._data.schedules?(0,B.GE)(r._data.schedules):null),a=(null===i||void 0===i||null===(n=i._data)||void 0===n?void 0:n.schedules)?(0,B.GE)(i._data.schedules):null,l=a?a.map((function(e){if(!h)return e;var n=e.workingDay,t=e.workingTimes,i={},r=0;return Object.keys(t).forEach((function(e){var o=t[e],a=(null===o||void 0===o?void 0:o.filter((function(e){var t=new Date("".concat(n," ").concat(e.started)),o=new Date,i=L.PcP*h;return t.getTime()>o.getTime()+i})))||[];i[e]=a,r+=a.length})),(0,c.A)((0,o.A)({},e),{slots:r,workingTimes:i})})):null,x(l),b(!1),[2]}}))})),n.apply(this,arguments)}}),[v,s,null===s||void 0===s?void 0:s.value,Me(t),r,l]),{scheduleLoading:m,schedule:y,workingTime:M,disabledDays:D,allSchedule:A,onResetSchedule:T,onScheduleLoading:S}}({date:n,startDate:t,endDate:r,isReset:l,isTeleMedicine:s,selectedDoctor:f,selectedSpecialty:p,doctorList:y,bufferTime:f?s?f.bufferTimeTele:f.bufferTimeOutpatient:0}),D=E.schedule,T=E.scheduleLoading,S=E.workingTime,M=E.disabledDays,_=E.allSchedule,I=E.onResetSchedule;return(0,u.useEffect)((function(){function e(){return e=(0,a.A)((function(){var e,n,t;return(0,d.__generator)(this,(function(o){switch(o.label){case 0:return b(!0),[4,R(v,p,h)];case 1:return n=o.sent(),t=(null===n||void 0===n||null===(e=n._data)||void 0===e?void 0:e.searches)?n._data.searches.map(B.pW):null,x(t||[]),b(!1),[2]}}))})),e.apply(this,arguments)}l||((null===p||void 0===p?void 0:p.value)||I(),function(){e.apply(this,arguments)}())}),[null===p||void 0===p?void 0:p.id,h.length>=3?h:"",l]),{list:y,loading:m,scheduleLoading:T,options:C,currentValue:A,notFound:!y.length,disabledDays:M,allSchedule:_,schedule:D,workingTime:S,onResetDoctor:function(){x([])}}},K=t(73419),J=t(72946),W=t(2543),q=t.n(W),Z=t(49785),X=t(36259),$=t(6982),ee=t(32485),ne=t.n(ee),te=t(98460),oe=function(e){var n=e.children,t=(0,u.useRef)(null),o=(0,u.useState)("left"),r=o[0],a=o[1],c=(0,u.useState)(!1),l=c[0],d=c[1];return(0,u.useEffect)((function(){t.current&&(t.current.scrollWidth<=t.current.clientWidth?l&&d(!1):l||d(!0))}),[t,n]),(0,u.useEffect)((function(){var e,n=function(){t.current&&(0===t.current.scrollLeft?a("left"):t.current.scrollLeft+t.current.clientWidth===t.current.scrollWidth?a("right"):a("mid"))},o=(0,W.throttle)(n,200);return null===(e=t.current)||void 0===e||e.addEventListener("scroll",o),n(),function(){var e;null===(e=t.current)||void 0===e||e.removeEventListener("scroll",o)}}),[]),(0,i.FD)(G.ad,{children:[(0,i.Y)(te.A,{className:ne()("chevron",{disabled:!l||"left"===r}),onClick:function(){t.current&&t.current.scrollTo({left:t.current.scrollLeft-(t.current.scrollWidth-t.current.clientWidth)/3,behavior:"smooth"})}}),(0,i.Y)(G.su,{ref:t,children:n}),(0,i.Y)(te.A,{className:ne()("chevron","right",{disabled:!l||"right"===r}),onClick:function(){t.current&&t.current.scrollTo({left:t.current.scrollLeft+(t.current.scrollWidth-t.current.clientWidth)/3,behavior:"smooth"})}})]})},ie=t(14550),re=function(e){var n=e.startDate,t=e.endDate,o=e.schedules,r=e.date,a=e.setDate,c=e.dataEventAction,l=e.dataEventCategory,d=e.dataEventLabel,s=e.isTeleMedicine;if(!o||!o.length)return null;var f=(0,U.A)().formatMessage,h=(0,u.useState)(Me(r)),g=h[0],m=h[1],b=(0,u.useMemo)((function(){return k({start:n,end:t}).map((function(e){var n,t=Me(e);return{date:e,day:t,numberOfSlots:(null===(n=o.find((function(e){return e.workingDay===t})))||void 0===n?void 0:n.slots)||0}}))}),[o]);(0,u.useEffect)((function(){m(Me(r))}),[r]),(0,u.useEffect)((function(){var e=b.find((function(e){return e.numberOfSlots>0})),n=[(null===e||void 0===e?void 0:e.date)||new Date,r].sort($.A);a(q().last(n)||new Date),m(Me(q().last(n)||new Date))}),[b]);var w=I().locale;return(0,u.useEffect)((function(){setTimeout((function(){var e=document.querySelector(".elm-scroll-to");if(e){var n=(0,ie.DP)(e);window.scrollTo({top:n-65,behavior:"smooth"})}}),1e3)}),[g]),(0,i.Y)(oe,{children:b.map((function(e){var n=e.date,t=e.day,o=e.numberOfSlots;return(0,i.FD)(G.nI,{"data-booking-day":t,"data-active":g===t,onClick:function(){a(n)},"data-event-category":l,"data-event-action":c,"data-event-label":d,className:s?"tele-booking-day-card":"out-patient-booking-day-card",children:[(0,i.Y)(p.T,{size:"xs",type:"caption",color:v.w.colors.gray600,style:{fontSize:12,whiteSpace:"nowrap"},className:"day",children:(0,C.A)(n,"EEE",{locale:w})}),(0,i.Y)(p.T,{size:"md",type:"bold",color:v.w.colors.gray800,style:{fontSize:16,lineHeight:"18px"},children:n.getDate()}),(0,i.Y)(p.T,{size:"xs",color:o>0?v.w.colors.green600:v.w.colors.gray400,style:{fontSize:12,whiteSpace:"nowrap"},className:"slot-number",children:o>0?o+" "+f({id:"bookingCard.slots",defaultMessage:"slot".concat(o>0?"s":"")}):f({id:"bookingCard.NoSlots",defaultMessage:"No slot"})})]},t)}))})},ae=function(e){var n=e.workingTimes,t=e.scheduleId,o=e.setSchedule,r=e.dataEventAction,a=e.dataEventCategory,c=e.dataEventLabel,l=e.isTeleMedicine;if(!n)return null;var d=(0,U.A)().formatMessage,s=(0,u.useState)(0),p=s[0],v=s[1],h=(0,u.useState)([]),m=h[0],b=h[1],w=(0,u.useMemo)((function(){var e=[],t=[];return n.morning&&(e.push({name:d({id:"bookingCard.morning",defaultMessage:"Morning"}).concat(" (".concat(n.morning.length,")"))}),t.push("morning")),n.afternoon&&(e.push({name:d({id:"bookingCard.afternoon",defaultMessage:"Afternoon"}).concat(" (".concat(n.afternoon.length,")"))}),t.push("afternoon")),n.evening&&(e.push({name:d({id:"bookingCard.evening",defaultMessage:"Evening"}).concat(" (".concat(n.evening.length,")"))}),t.push("evening")),b(t),e}),[n,d]);return(0,u.useEffect)((function(){o(null)}),[p]),(0,i.FD)(G.ol,{children:[(0,i.Y)(f.T,{className:"booking-time-tabs",tabContent:w,initialTab:p,onChange:v}),(0,i.Y)(G.PU,{children:(n[m[p]]||[]).map((function(e){return(0,i.Y)(g.B,{size:"md",color:t===e.schedule_id?"primary":"secondary",onClick:function(n){null===n||void 0===n||n.preventDefault(),o(e)},dataEventAction:r,dataEventCategory:a,dataEventLabel:c,className:l?"tele-booking-time-btn":"out-patient-booking-time-btn",children:"".concat(e.started," - ").concat(e.ended)},e.schedule_id)}))})]})};function ce(){return ce=Object.assign?Object.assign.bind():function(e){for(var n=1;n0&&(0,i.Y)(G.L8,{onClick:function(e){var n,t;"true"===(null===(n=e.target)||void 0===n||null===(t=n.getAttribute)||void 0===t?void 0:t.call(n,"data-is-open"))&&(x(""),d(null,"")),!h&&A(!C)},className:"dropdown-option","data-has-icons":!0,children:D.map((function(e){return(0,i.FD)(G.gG,{"data-selected":p&&p.value===e.value||void 0,onClick:function(){!h&&(null===d||void 0===d||d(e,e.value))},children:[e.icon&&(0,i.Y)(G.vE,{children:e.icon}),(0,i.Y)("div",{className:"dropdown-label",children:e.label})]},"".concat(r,"-").concat(e.value))}))})]})},ve=t(58065),fe=t(1135),he=function(e){var n=e.type,t=e.translationId,o=void 0===t?"":t,r=e.href,a=void 0===r?"":r,c=e.onClick,l=function(e){e.preventDefault(),null===c||void 0===c||c()},d=function(e){return(0,i.Y)("a",{href:a,onClick:l,target:"_blank",rel:"noreferrer noopener",children:e})};return(0,i.FD)(i.FK,{children:[n===fe.Kv.DEFAULT&&(0,i.Y)(G.sV,{children:(0,i.Y)(ve.A,{id:o,defaultMessage:"We could not find any result. Click here to see more",tagName:"p",values:{a:d}})}),n===fe.Kv.SEARCH&&(0,i.Y)(p.T,{size:"xs",className:"no-result",children:(0,i.Y)(ve.A,{id:"careBooking.noSearchResult",defaultMessage:"No matching result, please try another keyword or see more",tagName:"p",values:{a:d}})})]})},ge=t(40224),me=t(47055),be=t(40630),we=t(80783),ye=function(e){var n,t,s,y,x,A,E=e.onChangeTab,D=(0,K.$)(),T=D.locale,S=void 0===T?"en-PH":T,M=D.asPath,_=D.push,I=(0,me.A)(),Y=I.message,N=I.updateMessage,B=(0,J.o)().isValidOnboarding,F=(0,u.useState)(!1),R=F[0],z=F[1],P=(0,u.useState)(!1),V=P[0],H=P[1],j=(0,u.useState)(!1),q=j[0],$=j[1],ee=(0,u.useState)(void 0),ne=ee[0],te=ee[1],oe=(0,u.useMemo)((function(){return"https://".concat(r.y[S]).concat(L.JpE).concat(M)}),[S,M]),ie=(0,U.A)().formatMessage,ce=(0,u.useMemo)((function(){return{label:ie({id:"booking.allSpecialties",defaultMessage:"All specialties"}),name:ie({id:"booking.allSpecialties",defaultMessage:"All specialties"}),value:-1,id:-1}}),[]),le=(0,u.useContext)(X.B),de=le.state,se=le.pushNotifications,ve=de.isLoggedIn,ye=O(),xe=ye.date,ke=ye.setDate,Ce=ye.startDate,Ae=ye.endDate,Ee=ye.dateMonthValue,De=(0,Z.xW)(),Te=De.control,Se=De.watch,_e=De.setValue,Ie=De.resetField,Ye=Se("selected_hospital"),Le=Se("selected_specialty"),Oe=Se("selected_doctor"),Ne=Se("selected_schedule"),Be=Se("date");(0,u.useEffect)((function(){Ie("selected_specialty"),Ze("")}),[null===Ye||void 0===Ye?void 0:Ye.id]),(0,u.useEffect)((function(){(null===Oe||void 0===Oe?void 0:Oe.id)||Ie("selected_doctor"),en("")}),[null===Le||void 0===Le?void 0:Le.id,null===Oe||void 0===Oe?void 0:Oe.id]),(0,u.useEffect)((function(){Ie("selected_schedule")}),[null===Oe||void 0===Oe?void 0:Oe.id]),(0,u.useEffect)((function(){_e("date",Me(xe))}),[Ne]);var Fe=(0,u.useState)(!0),Re=Fe[0],ze=Fe[1],Pe=(0,u.useState)(!1),Ve=Pe[0],He=Pe[1],Ue=(0,u.useState)(!1),Ge=Ue[0],je=Ue[1],Qe=(0,u.useState)(!1),Ke=Qe[0],Je=Qe[1];(0,u.useEffect)((function(){ze(!0),Ie("selected_specialty"),Ie("selected_doctor"),Ie("selected_schedule"),_e("date",Me(new Date)),ze(!1)}),[Re]);var We=(0,u.useState)(""),qe=We[0],Ze=We[1],Xe=(0,u.useState)(""),$e=Xe[0],en=Xe[1],nn=(0,u.useMemo)((function(){return(0,W.debounce)((function(e){return Ze(e)}),300)}),[W.debounce]),tn=(0,u.useMemo)((function(){return(0,W.debounce)((function(e){return en(e)}),300)}),[W.debounce]),on=function(e){var n=e.selectedHospital,t=e.searchSpecialtyKeyword,r=e.selectedSpecialty,l=(0,u.useState)(!1),s=l[0],p=l[1],v=(0,u.useState)([]),f=v[0],h=v[1],g=(0,u.useMemo)((function(){return f.map((function(e){return(0,c.A)((0,o.A)({},e),{value:e.id,label:e.name,icon:(0,i.Y)("img",{src:e.thumbnail,alt:e.name,className:"hospital-image"})})}))}),[f]),m=(0,u.useMemo)((function(){return f.find((function(e){return e.value===(null===r||void 0===r?void 0:r.value)}))}),[f,r]);return(0,u.useEffect)((function(){function e(){return e=(0,a.A)((function(){var e,o,i;return(0,d.__generator)(this,(function(r){switch(r.label){case 0:return p(!0),[4,(0,w.px)((0,w.er)(b.R.GET_LIST_SPECIALTIES_BY_HOSPITAL,{hospitalId:null===n||void 0===n?void 0:n.id,keyword:t&&t.length>=3?t:""}),"GET")];case 1:return o=r.sent(),i=(0,w.BW)((null===o||void 0===o||null===(e=o._data)||void 0===e?void 0:e.specialties)||[]),Array.isArray(i)&&h(i),p(!1),[2]}}))})),e.apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[null===n||void 0===n?void 0:n.id,t.length>=3?t:""]),{list:f,loading:s,options:g,currentValue:m,notFound:!f.length}}({selectedHospital:Ye,searchSpecialtyKeyword:qe,selectedSpecialty:Le}),rn=Q({date:xe,startDate:Ce,endDate:Ae,isReset:Re,isTeleMedicine:Ve,selectedSpecialty:Le,selectedHospital:Ye,selectedDoctor:Oe,searchDoctorKeyword:$e}),an=(0,u.useState)(!1),cn=an[0],ln=an[1],dn=(0,u.useState)(!1),un=dn[0],sn=dn[1];(0,u.useEffect)((function(){Re||((null===Oe||void 0===Oe?void 0:Oe.id)&&!(null===Le||void 0===Le?void 0:Le.id)?(_e("selected_specialty",ce),ln(!0)):ln(!1))}),[null===Oe||void 0===Oe?void 0:Oe.id]),(0,u.useEffect)((function(){un||cn||Re||(null===Le||void 0===Le?void 0:Le.id)&&rn.options.length>0&&(_e("selected_doctor",rn.options[0]),sn(!1))}),[null===Le||void 0===Le?void 0:Le.id,cn,un,rn.options,Re]),(0,u.useEffect)((function(){var e,n;(null===(e=rn.currentValue)||void 0===e?void 0:e.validOutpatient)||He(!0),(null===(n=rn.currentValue)||void 0===n?void 0:n.validTelemedicine)||He(!1)}),[null===(n=rn.currentValue)||void 0===n?void 0:n.validOutpatient,null===(t=rn.currentValue)||void 0===t?void 0:t.validTelemedicine]);var pn=function(){var e="?doctorId=".concat(null===Oe||void 0===Oe?void 0:Oe.id,"&date=").concat(Be,"&scheduleId=").concat(Ne,"&telemedicine=").concat(Ve||""),n="/booking/doctor/".concat(e);if(ve&&B)_(n);else{var t=(0,w.sT)("".concat(L.JpE).concat(n),"care_onboarding");L.dXu?m.u.getState().triggerCareEmailPhoneVerify({returnUrl:"".concat(L.JpE).concat(n),source:"care_onboarding"}):window.location.href=t}},vn=(0,u.useMemo)((function(){if(rn.schedule)return k({start:Ce,end:Ae}).find((function(e){var n,t=Me(e);return((null===(n=rn.schedule.find((function(e){return e.workingDay===t})))||void 0===n?void 0:n.slots)||0)>0}))}),[rn.schedule]);function fn(){return fn=(0,a.A)((function(e){var n,t,o;return(0,d.__generator)(this,(function(i){switch(i.label){case 0:return null===e||void 0===e||e.preventDefault(),kn(ne)?(null===(n=rn.currentValue)||void 0===n?void 0:n.frisoCampaign)?de.isLoggedIn&&B?Ve?($(!0),[4,(0,w.T7)((0,w.er)(b.R.GET_FRISO_VALIDATION,{booking_type:"doctor",doctor_id:(null===Oe||void 0===Oe?void 0:Oe.id)||""}),"GET")]):[3,2]:(t=(0,w.sT)("".concat(L.JpE).concat(M),"care_onboarding"),L.dXu?m.u.getState().triggerCareEmailPhoneVerify({source:"care_onboarding"}):window.location.href=t,[2]):[3,3]:(se({message:ie({id:"error.invalid.timeSlot",defaultMessage:"The slot is not available. Please select the time greater than {bufferTime}."},{bufferTime:null===ne||void 0===ne?void 0:ne.started}),type:"danger"}),[2]);case 1:return o=i.sent(),N(o._data),z(!0),H(o._data.valid),$(!1),[2];case 2:return[2];case 3:return pn(),[2]}}))})),fn.apply(this,arguments)}var hn=function(){z(!1)},gn=(0,u.useMemo)((function(){return!rn||!rn.schedule||rn.schedule.length<1}),[rn]),mn=(0,u.useMemo)((function(){var e;return!!de.userInfo&&(null===(e=de.userInfo.email)||void 0===e?void 0:e.includes("@facebook.com"))}),[de.userInfo]),bn=(0,u.useMemo)((function(){return Oe?Ve?Oe.bufferTimeTele||0:Oe.bufferTimeOutpatient||0:0}),[Ve,Oe]),wn=(0,u.useMemo)((function(){return!!Oe&&(!Oe.isSiloam&&Number(Oe.price)>0)}),[Oe]),yn=[];(null===(s=rn.currentValue)||void 0===s?void 0:s.validOutpatient)&&yn.push({name:ie({id:"doctorDetailPage.appointment.outpatient",defaultMessage:"Outpatient Appointment"})}),(null===(y=rn.currentValue)||void 0===y?void 0:y.validTelemedicine)&&yn.push({name:ie({id:"doctorDetailPage.appointment.telemedicine",defaultMessage:"Telemedicine Appointment"})});var xn,kn=function(e){if(!e)return!0;var n=new Date("".concat((0,C.A)(xe,"yyyy/MM/dd")," ").concat(e.started)),t=new Date,o=L.PcP*bn;return!(n.getTime()<=t.getTime()+o)};return(0,i.Y)(i.FK,{children:!Re&&(0,i.FD)(G.rf,{children:[(0,i.Y)(Z.xI,{name:"selected_specialty",control:Te,render:function(e){var n=e.field,t=n.onChange,o=n.value;return(0,i.FD)("div",{children:[(0,i.Y)(p.T,{size:"label2",type:"bold",color:v.w.colors.gray600,className:"mb-[6px]",children:ie({id:"careBooking.specialty",defaultMessage:"Specialty"})}),(0,i.Y)(pe,{dropdownLabelTrackingAttributes:{"data-event-category":"Care","data-event-action":"Doctor Quick Booking - Specialty Click","data-event-label":oe},className:"booking-select",id:"select-specialty",options:on.options,value:o,placeholderIcon:(0,i.Y)(G.ph,{src:(null===Le||void 0===Le?void 0:Le.thumbnail)||"".concat(L.JpE,"/svg/search.svg")}),onChange:function(e){rn.onResetDoctor(),t(e),sn(!1),Ie("selected_doctor")},onSearchChange:nn,placeholder:on.options.length?ie({id:"careBooking.selectSpecialty",defaultMessage:"Select Specialty"}):ie({id:"common.noResultFound",defaultMessage:"No result found"}),useSearchFilter:!1}),on.notFound&&(0,i.Y)(he,{type:fe.Kv.SEARCH})]})}}),(0,i.Y)(Z.xI,{name:"selected_doctor",control:Te,render:function(e){var n,t,o,r,a,c=e.field.onChange;return(0,i.FD)(G.wQ,{className:"elm-scroll-to",children:[(0,i.Y)(p.T,{size:"label2",type:"bold",color:v.w.colors.gray600,className:"mb-[6px]",children:ie({id:"careBooking.doctor",defaultMessage:"Doctor"})}),(0,i.FD)("div",{className:"booking-select",children:[(0,i.Y)(pe,{dropdownLabelTrackingAttributes:{"data-event-category":"Care","data-event-action":"Doctor Quick Booking - Doctor Click","data-event-label":oe},id:"select-doctor",className:(null===Oe||void 0===Oe?void 0:Oe.id)||(null===(n=rn.currentValue)||void 0===n?void 0:n.id)?"has-seleted-option":"",options:rn.options,placeholderIcon:(0,i.Y)(G.ph,{src:(null===Oe||void 0===Oe?void 0:Oe.avatar)||"".concat(L.JpE,"/svg/search.svg")}),onChange:c,onSearchChange:tn,placeholder:rn.notFound&&!$e&&(null===Le||void 0===Le?void 0:Le.id)?ie({id:"common.noResultFound",defaultMessage:"No result found"}):ie({id:"careBooking.selectDoctor",defaultMessage:"Select Doctor"}),useSearchFilter:!1}),((null===Oe||void 0===Oe?void 0:Oe.id)||(null===(t=rn.currentValue)||void 0===t?void 0:t.id))&&(0,i.Y)(ue,{logo:Oe.avatar||rn.currentValue.avatar,name:Oe.name||rn.currentValue.name,price:Oe.price||rn.currentValue.price,priceUnit:(null===Oe||void 0===Oe?void 0:Oe.priceUnit)||(null===rn||void 0===rn||null===(o=rn.currentValue)||void 0===o?void 0:o.priceUnit),priceTo:(null===Oe||void 0===Oe?void 0:Oe.priceTo)||(null===rn||void 0===rn||null===(r=rn.currentValue)||void 0===r?void 0:r.priceTo),priceType:(null===Oe||void 0===Oe?void 0:Oe.priceType)||(null===rn||void 0===rn||null===(a=rn.currentValue)||void 0===a?void 0:a.priceType),isShowPrice:wn,onEditClick:function(){Ie("selected_doctor"),sn(!0)}}),rn.notFound&&!rn.loading&&(null===Le||void 0===Le?void 0:Le.id)&&($e?(0,i.Y)(he,{type:fe.Kv.SEARCH,onClick:function(){return E(fe.uN.DOCTORS)}}):(0,i.Y)(he,{type:fe.Kv.DEFAULT,translationId:"careBooking.noDoctorLabel",onClick:function(){return E(fe.uN.DOCTORS)}}))]})]})}}),!rn.notFound&&!rn.loading&&(null===Le||void 0===Le?void 0:Le.id)&&(0,i.FD)(i.FK,{children:[(0,i.FD)(G.kR,{children:[(null===(x=rn.currentValue)||void 0===x?void 0:x.validTelemedicine)&&(0,i.Y)(G.Ut,{children:(0,i.Y)(p.T,{size:"n1",type:"bold",color:"white",children:ie({id:"doctorDetailPage.appointment.new",defaultMessage:"New"})})}),(0,i.Y)(f.T,{className:"booking-tabs",initialTab:0,tabContent:yn,style:{paddingLeft:0},onChange:function(e){He(!!e),_e("selected_schedule",""),Ke&&Je(!1)}}),(0,i.Y)("div",{className:"booking-description",children:ie({id:"doctorDetailPage.appointment.selectTimeslot",defaultMessage:"Please select the timeslot below"})})]}),(0,i.FD)(G.p3,{children:[(0,i.Y)(p.T,{size:"label2",type:"bold",color:v.w.colors.gray600,className:"mb-[6px]",children:ie({id:"careBooking.time",defaultMessage:"Time"})}),(0,i.Y)(f.D,{className:"booking-date",customInput:function(e){return(0,i.Y)(h.I,(0,c.A)((0,o.A)({type:"text",size:"md",name:"booking-date"},e),{value:Ee,isDisabled:!(null===Oe||void 0===Oe?void 0:Oe.id)||rn.notFound,actionIcon:(0,i.Y)("img",{src:"".concat(L.JpE,"/svg/calendar-solid.svg")}),readOnly:!0,trackingAttributes:{dataEventCategory:"Care",dataEventAction:"Doctor Quick Booking - Appointment Click",dataEventLabel:oe}}))},disabledDays:(0,l.A)(null!==(xn=rn.disabledDays)&&void 0!==xn?xn:[]).concat([{before:new Date,after:(null===(A=rn.allSchedule)||void 0===A?void 0:A.length)?new Date(rn.allSchedule[0].workingDay):Ae}]),locale:S,pickedDate:xe,displayDateFormat:L.CMh,onChange:function(e){ke(e)},placeholder:""}),gn&&!rn.loading?(0,i.FD)(G.$e,{children:[(0,i.Y)(we.A,{}),(0,i.Y)(p.T,{size:"sm",color:v.w.colors.gray500,children:ie({id:"bookingCard.noResults",defaultMessage:"Sorry! Our doctor is quite busy now. Please come back tomorrow or make a booking with another doctor."})})]}):(0,i.FD)(i.FK,{children:[(0,i.Y)(re,{startDate:Ce,endDate:Ae,schedules:rn.schedule,date:xe,setDate:ke,dataEventCategory:"Care",dataEventAction:"Doctor Quick Booking - Appointment Click",dataEventLabel:oe,isTeleMedicine:Ve}),(0,i.Y)(ae,{workingTimes:rn.workingTime,scheduleId:Ne,setSchedule:function(e){e&&(kn(e)?(_e("selected_schedule",e.schedule_id),te(e),(null===e||void 0===e?void 0:e.schedule_id)&&!Ke&&!Ne&&mn&&(je(!0),Je(!0))):se({message:ie({id:"error.invalid.timeSlot",defaultMessage:"The slot is not available. Please select the time greater than {bufferTime}."},{bufferTime:e.started}),type:"danger"}))},dataEventCategory:"Care",dataEventAction:"Doctor Quick Booking - Appointment Click",dataEventLabel:oe,isTeleMedicine:Ve}),(0,i.Y)(be.A,{className:"doctor-booking-warning",open:Ge,onContinueBooking:function(){je(!1)},handleOnClose:function(){return je(!1)}})]})]})]}),(0,i.Y)(G.bO,{children:!rn.workingTime&&(null===Le||void 0===Le?void 0:Le.id)?(0,i.Y)(g.B,{color:"primary",size:"lg",onClick:function(){vn&&ke(vn)},dataEventCategory:"Care",dataEventAction:"Doctor Quick Booking - Booking Click",dataEventLabel:oe,isLoading:q,children:ie({id:"bookingCard.seeNearest",defaultMessage:"See nearest availabilities"})}):(0,i.Y)(g.B,{color:"primary",size:"lg",onClick:function(e){return fn.apply(this,arguments)},dataEventCategory:"Care",dataEventAction:"Doctor Quick Booking - Booking Click",dataEventLabel:oe,isLoading:q,isDisabled:!Boolean((null===Ye||void 0===Ye?void 0:Ye.id)&&((null===Le||void 0===Le?void 0:Le.id)||(null===Le||void 0===Le?void 0:Le.value))&&(null===Oe||void 0===Oe?void 0:Oe.id)&&Ne),children:ie({id:"hospital.bookAnAppointment",defaultMessage:"Book an Appointment"})})}),(0,i.Y)(ge.A,{open:R,message:Y,handleOnClose:hn,handleOnOk:function(){V?pn():hn()}})]})})},xe=t(35094),ke=function(e){var n,t=e.activeTab,s=(0,K.$)(),y=s.locale,x=void 0===y?"en-PH":y,A=s.push,E=s.asPath,D=s.query,T=(0,N.A)((0,xe.Q)(),1)[0],S=(0,u.useMemo)((function(){return"https://".concat(r.y[x]).concat(L.JpE).concat(E)}),[x,E]),M=(0,u.useContext)(X.B),_=M.state,I=M.pushNotifications,Y=(0,J.o)().isValidOnboarding,R=_.isLoggedIn,z=(0,U.A)().formatMessage,P=O(),V=P.date,H=P.setDate,Q=P.startDate,W=P.endDate,q=P.dateMonthValue,$=(0,Z.xW)(),ee=$.control,ne=$.watch,te=$.setValue,oe=$.resetField,ie=ne("selected_hospital"),ce=ne("selected_service"),le=ne("date"),de=ne("selected_service_schedule"),se=(0,u.useState)(""),ve=se[0],ge=se[1],me=(0,u.useState)(!0),we=me[0],ye=me[1],ke=(0,u.useState)(!1),Ce=ke[0],Ae=ke[1],Ee=(0,u.useState)(!1),De=Ee[0],Te=Ee[1],Se=(0,u.useState)(void 0),_e=Se[0],Ie=Se[1];(0,u.useEffect)((function(){ye(!0),oe("selected_service"),oe("selected_service_schedule"),te("date",Me(new Date)),ye(!1)}),[]),(0,u.useEffect)((function(){te("date",Me(V))}),[de,V]);var Ye,Le=function(e,n,t,r,l,s,p,v){var f=(0,u.useState)(!1),h=f[0],g=f[1],m=(0,u.useState)(!1),y=m[0],x=m[1],C=(0,u.useState)([]),A=C[0],E=C[1],D=(0,u.useState)(null),T=D[0],S=D[1],M=(0,u.useState)(null),_=M[0],I=M[1],Y=(0,u.useMemo)((function(){return(null===_||void 0===_?void 0:_.length)?k({start:new Date,end:(0,F.A)(new Date(_[0].workingDay),1)}).map((function(e){var n,t=Me(e),o=(null===(n=_.find((function(e){return e.workingDay===t})))||void 0===n?void 0:n.slots)||0;if(!o||0===o)return e})):[]}),[_]),L=(0,u.useMemo)((function(){return A.map((function(e){return(0,c.A)((0,o.A)({},e),{value:e.id,label:(0,i.Y)(j,{name:e.name,price:e.price,priceTo:e.priceTo?String(e.priceTo):"",priceType:e.priceType||"",priceUnit:e.priceUnit}),icon:(0,i.Y)("img",{src:e.logoService,alt:e.name,className:"hospital-image"})})}))}),[A]),O=(0,u.useMemo)((function(){var n;return null===(n=null===T||void 0===T?void 0:T.find((function(n){return n.workingDay===Me(e||new Date)})))||void 0===n?void 0:n.workingTimes}),[T,e]),R=(0,u.useCallback)((0,a.A)((function(){var e,o,i;return(0,d.__generator)(this,(function(r){switch(r.label){case 0:return(null===s||void 0===s?void 0:s.id)?(x(!0),[4,Promise.all([(0,w.px)((0,w.er)(b.R.GET_SERVICE_SCHEDULE,{serviceId:String(null===s||void 0===s?void 0:s.id),startDate:Me(n),endDate:Me(t)}),"GET"),(0,w.px)((0,w.er)(b.R.GET_SERVICE_SCHEDULE,{serviceId:String(null===s||void 0===s?void 0:s.id),startDate:Me(n)}),"GET")])]):[3,2];case 1:return e=N.A.apply(void 0,[r.sent(),2]),o=e[0],(null===(i=e[1])||void 0===i?void 0:i._data)&&I(i._data.schedules?(0,B.kT)(i._data.schedules):null),(null===o||void 0===o?void 0:o._data)&&S(o._data.schedules?(0,B.kT)(o._data.schedules):null),[3,3];case 2:S(null),r.label=3;case 3:return x(!1),[2]}}))})),[null===s||void 0===s?void 0:s.id,n,t]);return(0,u.useEffect)((function(){l||((null===s||void 0===s?void 0:s.id)&&""!==(null===s||void 0===s?void 0:s.id)?R():S([]))}),[null===s||void 0===s?void 0:s.id,Me(n),l]),(0,u.useEffect)((function(){(0,a.A)((function(){var e;return(0,d.__generator)(this,(function(n){switch(n.label){case 0:return g(!0),[4,(0,w.px)((0,w.er)(b.R.GET_SERVICE_QUICK_BOOKING,{hospitalBranchId:v||"",keyword:p&&p.length>=3?p:""}),"GET",{headers:{accept:"application/json, text/plain, version=2.0.0"}}).then((function(e){var n;return((null===e||void 0===e||null===(n=e._data)||void 0===n?void 0:n.searches.filter((function(e){return!e.package})))||[]).map(B.JG)||[]}))];case 1:return e=n.sent(),E(e),g(!1),[2]}}))}))()}),[v,p&&p.length>=3?p:""]),(0,u.useEffect)((function(){S([])}),[null===s||void 0===s?void 0:s.value,r]),{loading:h,scheduleLoading:y,options:L,schedule:T,workingTime:O,disabledDays:Y,allSchedule:_}}(V,Q,W,t,we,ce,ve,ie.id),Oe=(0,u.useMemo)((function(){var e;return!!_.userInfo&&(null===(e=_.userInfo.email)||void 0===e?void 0:e.includes("@facebook.com"))}),[_.userInfo]),Ne=(0,u.useMemo)((function(){return ce&&(null===ce||void 0===ce?void 0:ce.bufferTime)||0}),[]),Be=(0,u.useMemo)((function(){if(Le.schedule)return k({start:Q,end:W}).find((function(e){var n,t=Me(e);return((null===(n=Le.schedule.find((function(e){return e.workingDay===t})))||void 0===n?void 0:n.slots)||0)>0}))}),[Le.schedule]),Fe=function(e){if(!e)return!0;var n=new Date("".concat((0,C.A)(V,"yyyy/MM/dd")," ").concat(e.started)),t=new Date,o=L.PcP*Ne;return!(n.getTime()<=t.getTime()+o)};return(0,i.Y)(i.FK,{children:!we&&(0,i.FD)(G.rf,{children:[(0,i.Y)(Z.xI,{name:"selected_service",control:ee,render:function(e){var n=e.field.onChange;return(0,i.FD)(G.wQ,{className:"elm-scroll-to",children:[(0,i.Y)(p.T,{size:"label2",type:"bold",color:v.w.colors.gray600,className:"mb-[6px]",children:z({id:"careBooking.service",defaultMessage:"Service"})}),(0,i.FD)("div",{className:"booking-select",children:[(0,i.Y)(pe,{dropdownLabelTrackingAttributes:{"data-event-category":"Care","data-event-action":"Service Quick Booking - Service Click","data-event-label":S},id:"select-service",className:(null===ce||void 0===ce?void 0:ce.id)?"has-seleted-option":"",options:Le.options,placeholderIcon:(0,i.Y)(G.ph,{src:(null===ce||void 0===ce?void 0:ce.logoService)||"".concat(L.JpE,"/svg/search.svg")}),onChange:n,onSearchChange:function(e){return ge(e)},placeholder:z({id:"careBooking.selectService",defaultMessage:"Select Service"}),useSearchFilter:!1}),(null===ce||void 0===ce?void 0:ce.id)&&(0,i.Y)(ue,{logo:ce.logoService,name:ce.name,price:ce.price,priceTo:ce.priceTo?String(ce.priceTo):"",priceType:ce.priceType||"",priceUnit:ce.priceUnit,onEditClick:function(){return oe("selected_service")}}),(!Array.isArray(Le.options)||0===Le.options.length)&&(ve?(0,i.Y)(he,{type:fe.Kv.SEARCH}):(0,i.Y)(he,{type:fe.Kv.DEFAULT,translationId:"careBooking.noHospitalLabel",onClick:function(){var e=(0,c.A)((0,o.A)({},D),{tab:T.services});s.replace({pathname:s.pathname,query:e},void 0,{shallow:!0})}}))]})]})}}),(0,i.FD)(G.p3,{children:[(0,i.Y)(p.T,{size:"label2",type:"bold",color:v.w.colors.gray600,className:"mb-[6px]",children:z({id:"careBooking.time",defaultMessage:"Time"})}),(0,i.Y)(f.D,{className:"booking-date",customInput:function(e){return(0,i.Y)(h.I,(0,c.A)((0,o.A)({type:"text",size:"md",name:"booking-date"},e),{value:q,isDisabled:!(null===ce||void 0===ce?void 0:ce.id),actionIcon:(0,i.Y)("img",{src:"".concat(L.JpE,"/svg/calendar-solid.svg")}),readOnly:!0,trackingAttributes:{dataEventCategory:"Care",dataEventAction:"Service Quick Booking - Appointment Click",dataEventLabel:S}}))},disabledDays:(0,l.A)(null!==(Ye=Le.disabledDays)&&void 0!==Ye?Ye:[]).concat([{before:new Date,after:(null===(n=Le.allSchedule)||void 0===n?void 0:n.length)?new Date(Le.allSchedule[0].workingDay):W}]),locale:x,pickedDate:V,displayDateFormat:L.CMh,onChange:function(e){H(e)},placeholder:""}),(0,i.Y)(re,{startDate:Q,endDate:W,schedules:Le.schedule,date:V,setDate:H,dataEventCategory:"Care",dataEventAction:"Service Quick Booking - Appointment Click",dataEventLabel:S,isTeleMedicine:!1}),(0,i.Y)(ae,{workingTimes:Le.workingTime,scheduleId:de,setSchedule:function(e){e&&(Fe(e)?(te("selected_service_schedule",e.schedule_id),Ie(e),e.schedule_id&&!De&&!de&&Oe&&(Ae(!0),Te(!0))):I({message:z({id:"error.invalid.timeSlot",defaultMessage:"The slot is not available. Please select the time greater than {bufferTime}."},{bufferTime:e.started}),type:"danger"}))},dataEventCategory:"Care",dataEventAction:"Service Quick Booking - Appointment Click",dataEventLabel:S,isTeleMedicine:!1}),(0,i.Y)(be.A,{className:"doctor-booking-warning",open:Ce,onContinueBooking:function(){Ae(!1)},handleOnClose:function(){return Ae(!1)}})]}),(0,i.Y)(G.bO,{children:!Le.workingTime&&(null===ce||void 0===ce?void 0:ce.id)?(0,i.Y)(g.B,{color:"primary",size:"lg",onClick:function(){Be&&H(Be)},dataEventCategory:"Care",dataEventAction:"Doctor Quick Booking - Booking Click",dataEventLabel:S,children:z({id:"bookingCard.seeNearest",defaultMessage:"See nearest availabilities"})}):(0,i.Y)(g.B,{color:"primary",size:"lg",dataEventCategory:"Care",dataEventAction:"Service Quick Booking - Booking Click",dataEventLabel:S,isDisabled:!Boolean((null===ie||void 0===ie?void 0:ie.id)&&(null===ce||void 0===ce?void 0:ce.value)&&de),onClick:function(e){if(null===e||void 0===e||e.preventDefault(),Fe(_e)){var n="?serviceId=".concat(null===ce||void 0===ce?void 0:ce.id,"&date=").concat(le,"&scheduleId=").concat(de),t="/booking/service/".concat(n);if(R&&Y)A(t);else{var o=(0,w.sT)("".concat(L.JpE).concat(t),"care_onboarding");L.dXu?m.u.getState().triggerCareEmailPhoneVerify({returnUrl:"".concat(L.JpE).concat(E),source:"care_onboarding"}):window.location.href=o}}else I({message:z({id:"error.invalid.timeSlot",defaultMessage:"The slot is not available. Please select the time greater than {bufferTime}."},{bufferTime:null===_e||void 0===_e?void 0:_e.started}),type:"danger"})},children:z({id:"hospital.bookAnAppointment",defaultMessage:"Book an Appointment"})})})]})})};function Ce(){return Ce=Object.assign?Object.assign.bind():function(e){for(var n=1;n li {\n width: 100%;\n justify-content: center;\n &[data-is-tab-active='true'] {\n svg path {\n fill: ",";\n }\n }\n\n &[data-is-tab-active='false'] {\n svg path {\n fill: ",";\n }\n }\n }\n }\n\n .selected-hospital-input input:disabled {\n background-color: transparent;\n }\n"]);return c=function(){return e},e}function l(){var e=(0,o.A)(["\n position: relative;\n overflow: auto;\n height: calc(100vh - 70px);\n padding: 16px;\n background-color: ",";\n\n "," {\n height: calc(var(--app-height, 100vh) - 70px);\n }\n\n ::-webkit-scrollbar {\n display: none;\n }\n\n .quick-booking-switch {\n margin-bottom: 24px;\n width: 100%;\n & > li {\n width: 100%;\n justify-content: center;\n &[data-is-tab-active='true'] {\n svg path {\n fill: ",";\n }\n }\n\n &[data-is-tab-active='false'] {\n svg path {\n fill: ",";\n }\n }\n }\n }\n"]);return l=function(){return e},e}function d(){var e=(0,o.A)(["\n .booking-select {\n position: relative;\n &[data-has-icons='true'] {\n border: 1px solid ",";\n &:not([data-disabled='true']) {\n background-color: ",";\n }\n }\n\n ul {\n z-index: ",";\n max-height: 304px;\n background-color: ",";\n box-shadow: -4px 4px 8px rgba(67, 86, 100, 0.102956),\n -8px 8px 16px rgba(67, 86, 100, 0.0780977);\n overflow-y: scroll;\n img {\n object-fit: contain;\n }\n }\n /* span {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n padding-right: 10px;\n } */\n\n .has-seleted-option {\n display: none;\n }\n }\n"]);return d=function(){return e},e}function u(){var e=(0,o.A)(["\n background-color: ",";\n position: relative;\n\n input {\n background-color: ",";\n cursor: pointer;\n }\n\n .doctor-booking-warning {\n width: 100%;\n }\n"]);return u=function(){return e},e}function s(){var e=(0,o.A)(["\n button,\n a {\n width: 100%;\n }\n a {\n text-decoration: none;\n }\n"]);return s=function(){return e},e}function p(){var e=(0,o.A)(["\n position: relative;\n padding: 8px 0 24px;\n font-size: 14px;\n .no-result {\n margin-top: 8px;\n\n a {\n text-decoration: none;\n }\n }\n"]);return p=function(){return e},e}function v(){var e=(0,o.A)(["\n position: initial;\n top: 0;\n left: 0;\n display: flex;\n width: 100%;\n align-items: center;\n padding: 8px;\n background-color: ",";\n border: 1px solid ",";\n border-radius: 6px;\n gap: 8px;\n > img {\n width: 32px;\n height: 32px;\n border-radius: 50%;\n object-fit: cover;\n outline: 1px solid ",";\n }\n\n .doctor-edit-icon {\n align-self: flex-start;\n margin-left: auto;\n cursor: pointer;\n flex: 0 0 16px;\n }\n .hospital-card-icon {\n padding-right: 8px;\n }\n"]);return v=function(){return e},e}function f(){var e=(0,o.A)(["\n display: flex;\n overflow: hidden;\n width: 100%;\n align-items: center;\n justify-content: space-between;\n margin-top: 16px;\n\n .chevron {\n cursor: pointer;\n\n path {\n stroke: "," !important;\n transition: stroke 0.2s;\n }\n\n &.disabled {\n pointer-events: none;\n path {\n stroke: "," !important;\n }\n }\n\n &.right {\n transform: rotateZ(180deg);\n }\n }\n"]);return f=function(){return e},e}function h(){var e=(0,o.A)(["\n display: flex;\n width: calc(100% - 64px);\n flex-wrap: nowrap;\n padding: 8px 0px;\n gap: 8px;\n overflow-x: scroll;\n\n ::-webkit-scrollbar {\n display: none;\n }\n"]);return h=function(){return e},e}function g(){var e=(0,o.A)(["\n display: flex;\n width: 86px;\n padding: 5px;\n height: 68px;\n flex: 0 0 calc((100% - 24px) / 3);\n flex-direction: column;\n align-items: center;\n justify-content: space-between;\n border: 1px solid transparent;\n margin: 0 auto;\n background: ",";\n border-radius: 6px;\n cursor: pointer;\n\n .day {\n line-height: 20px;\n }\n\n &[data-active='true'] {\n border-color: ",";\n background-color: ",";\n }\n\n * {\n pointer-events: none;\n }\n p {\n line-height: 18px;\n }\n\n &.tele-booking-day-card {\n .slot-number {\n color: ",";\n }\n\n &[data-active='true'] {\n border: 1px solid ",";\n background: #fff8e2;\n }\n }\n"]);return g=function(){return e},e}function m(){var e=(0,o.A)(["\n margin-top: 24px;\n\n .booking-time-tabs {\n width: 100%;\n > li {\n flex: 1;\n justify-content: center;\n &[aria-selected='false'] {\n border-bottom: 3px solid transparent;\n margin-bottom: -1px;\n }\n }\n }\n"]);return m=function(){return e},e}function b(){var e=(0,o.A)(["\n display: grid;\n margin-top: 24px;\n grid-gap: 8px;\n grid-template-columns: repeat(3, 1fr);\n\n button {\n padding: 7px 0 !important;\n &[data-color='secondary'] {\n padding: 8px 0 !important;\n border: 1px solid ",";\n > span {\n color: ",";\n font-weight: ",";\n }\n }\n\n &.tele-booking-time-btn {\n &:hover {\n background-color: "," !important;\n border: 1px solid "," !important;\n > span {\n color: ",";\n }\n }\n &[data-color='primary'] {\n background-color: ",";\n border: 1px solid ",";\n > span {\n color: ",";\n }\n\n &:hover {\n background-color: ",";\n border: 1px solid\n ",";\n }\n }\n }\n }\n"]);return b=function(){return e},e}function w(){var e=(0,o.A)(["\n width: 100%;\n overflow: hidden;\n padding: 16px;\n .type {\n &-wrapper {\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 8px;\n padding: 4px;\n background-color: ",";\n }\n &-button {\n width: 100%;\n /* padding: 7px 16px; */\n max-height: 32px;\n border-radius: 4px;\n &.active {\n }\n }\n }\n"]);return w=function(){return e},e}function y(){var e=(0,o.A)(["\n padding: 8px 8px 8px 16px;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 60px;\n background-color: ",";\n border-radius: 6px;\n p {\n font-size: 14px;\n font-weight: 400;\n color: ",";\n letter-spacing: -0.2px;\n line-height: 22px;\n }\n"]);return y=function(){return e},e}function x(){var e=(0,o.A)(["\n width: 24px;\n height: 24px;\n object-fit: contain;\n"]);return x=function(){return e},e}function k(){var e=(0,o.A)(["\n overflow: hidden;\n .hospital-card-icon {\n padding-right: 0;\n }\n .option-name {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n"]);return k=function(){return e},e}function C(){var e=(0,o.A)(["\n display: flex;\n flex: 2;\n align-items: center;\n\n .icon-price {\n display: flex;\n flex-direction: column;\n justify-content: center;\n padding-right: 8px;\n img {\n width: 16px;\n height: 16px;\n }\n }\n\n .text-price {\n display: flex;\n flex-wrap: wrap;\n }\n\n .price {\n font-weight: 600;\n }\n"]);return C=function(){return e},e}function A(){var e=(0,o.A)(["\n display: flex;\n flex-direction: column;\n gap: 24px;\n position: relative;\n\n "," {\n &[data-has-switch='false'] {\n margin-top: 24px;\n }\n }\n"]);return A=function(){return e},e}function E(){var e=(0,o.A)(["\n position: relative;\n border: 1px solid ",";\n background-position: right 16px center;\n border-radius: 6px;\n background-color: ",";\n\n &[data-has-icons='true'] {\n border: none;\n\n img,\n svg {\n display: inline-block;\n max-width: 16px;\n }\n\n span {\n display: inline-block;\n vertical-align: middle;\n }\n\n &:hover {\n box-shadow: none;\n }\n > div {\n position: relative;\n display: flex;\n width: 100%;\n box-sizing: border-box;\n align-items: center;\n }\n > div::after {\n position: absolute;\n z-index: 0;\n padding: 8px 0px;\n }\n\n &[data-is-open='false'] {\n > div::after {\n top: 50%;\n right: 0;\n width: 52px;\n height: 36px;\n background-image: url(\"data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9.99968 11.7259L6.81551 8.54171C6.47051 8.19671 5.91051 8.19671 5.56551 8.54171C5.22051 8.88671 5.22051 9.44671 5.56551 9.79171L9.41051 13.6367C9.73635 13.9625 10.2638 13.9625 10.5888 13.6367L14.4338 9.79171C14.7788 9.44671 14.7788 8.88671 14.4338 8.54171C14.0888 8.19671 13.5288 8.19671 13.1838 8.54171L9.99968 11.7259Z' fill='%23595959'/%3E%3C/svg%3E%0A\");\n background-position: center;\n background-repeat: no-repeat;\n content: '';\n transform: translateY(-50%);\n }\n }\n &[data-is-open='true'] {\n > div::after {\n top: 50%;\n right: 0;\n width: 52px;\n height: 36px;\n background-image: url(\"data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M1.66675 10.0001C1.66675 5.39175 5.39175 1.66675 10.0001 1.66675C14.6084 1.66675 18.3334 5.39175 18.3334 10.0001C18.3334 14.6084 14.6084 18.3334 10.0001 18.3334C5.39175 18.3334 1.66675 14.6084 1.66675 10.0001ZM12.4084 13.5834C12.7334 13.9084 13.2584 13.9084 13.5834 13.5834C13.9001 13.2584 13.9001 12.7251 13.5834 12.4084L11.1751 10.0001L13.5834 7.59175C13.9084 7.26675 13.9084 6.74175 13.5834 6.41675C13.2584 6.09175 12.7334 6.09175 12.4084 6.41675L10.0001 8.82508L7.59175 6.41675C7.26675 6.09175 6.74175 6.09175 6.41675 6.41675C6.2607 6.57244 6.17301 6.78382 6.17301 7.00425C6.17301 7.22468 6.2607 7.43606 6.41675 7.59175L8.82508 10.0001L6.41675 12.4084C6.2607 12.5641 6.17301 12.7755 6.17301 12.9959C6.17301 13.2163 6.2607 13.4277 6.41675 13.5834C6.74175 13.9084 7.26675 13.9084 7.59175 13.5834L10.0001 11.1751L12.4084 13.5834Z' fill='%238C8C8C'/%3E%3C/svg%3E%0A\");\n background-position: center;\n background-repeat: no-repeat;\n content: '';\n transform: translateY(-50%);\n }\n }\n\n &:disabled {\n > div::after {\n display: none;\n }\n }\n }\n\n &:hover {\n box-shadow: 0 0 2px 2px ",";\n }\n"]);return E=function(){return e},e}function D(){var e=(0,o.A)(["\n cursor: pointer;\n &[data-dropdown-open] {\n padding: 11px 15px 11px 15px;\n border: 1px solid ",";\n border-radius: 6px;\n box-shadow: 0 0 2px 2px ",";\n }\n"]);return D=function(){return e},e}function T(){var e=(0,o.A)(["\n position: absolute;\n z-index: 100;\n top: 100%;\n right: 0;\n left: 0;\n display: block;\n max-height: 500px;\n margin-top: 4px;\n background: ",";\n border-radius: 6px;\n box-shadow: -1px 1px 2px rgba(67, 70, 74, 0.0001),\n -2px 2px 5px rgba(67, 86, 100, 0.123689);\n cursor: pointer;\n overflow-y: auto;\n\n &[data-has-icons='true'] {\n border: 1px solid ",";\n background: white;\n box-shadow: none;\n filter: drop-shadow(0px 10px 16px rgba(0, 0, 0, 0.04));\n }\n"]);return T=function(){return e},e}function S(){var e=(0,o.A)(["\n display: flex;\n width: 100%;\n align-items: center;\n justify-content: flex-start;\n padding: 6px 18px 6px 16px;\n &:hover,\n :active {\n background: ",";\n }\n .dropdown-label {\n line-height: 20px;\n }\n"]);return S=function(){return e},e}function M(){var e=(0,o.A)(["\n width: 24px;\n height: 24px;\n flex-shrink: 0;\n overflow: hidden;\n"]);return M=function(){return e},e}function _(){var e=(0,o.A)(["\n input {\n padding: 12px 36px 12px 48px;\n }\n\n &[data-has-display-icon] input {\n padding: 12px 36px 12px 48px;\n }\n .displayIcon {\n img {\n width: 24px;\n max-width: unset;\n height: 24px;\n }\n }\n"]);return _=function(){return e},e}function I(){var e=(0,o.A)(["\n position: relative;\n\n .booking-tabs {\n width: 100%;\n\n li {\n flex: 1;\n justify-content: center;\n }\n }\n\n .booking-description {\n color: ",";\n font-size: 14px;\n line-height: 22px;\n margin-top: 20px;\n }\n"]);return I=function(){return e},e}function Y(){var e=(0,o.A)(["\n position: absolute;\n background-color: ",";\n padding: 2px 4px;\n border-radius: 2px;\n right: 0;\n top: -20px;\n"]);return Y=function(){return e},e}function L(){var e=(0,o.A)(["\n padding: 20px;\n svg {\n display: block;\n max-width: 84px;\n margin: 0 auto;\n margin-bottom: 26px;\n }\n"]);return L=function(){return e},e}var O=a.Ay.div.withConfig({componentId:"sc-ce33c832-0"})(c(),(function(e){return e.theme.colors.neutral50}),(function(e){return e.theme.colors.primaryActive}),(function(e){return e.theme.colors.gray500})),N=a.Ay.form.withConfig({componentId:"sc-ce33c832-1"})(l(),(function(e){return e.theme.colors.neutral50}),i.M.mbDown,(function(e){return e.theme.colors.primaryActive}),(function(e){return e.theme.colors.gray500})),B=a.Ay.div.withConfig({componentId:"sc-ce33c832-2"})(d(),(function(e){return e.theme.colors.gray200}),(function(e){return e.theme.colors.white}),(function(e){return e.theme.zIndexes.onTop}),(function(e){return e.theme.colors.white})),F=a.Ay.div.withConfig({componentId:"sc-ce33c832-3"})(u(),(function(e){return e.theme.colors.neutral50}),(function(e){return e.theme.colors.white})),R=a.Ay.div.withConfig({componentId:"sc-ce33c832-4"})(s()),z=(a.Ay.div.withConfig({componentId:"sc-ce33c832-5"})(p()),a.Ay.div.withConfig({componentId:"sc-ce33c832-6"})(v(),(function(e){return e.theme.colors.white}),(function(e){return e.theme.colors.neutral100}),(function(e){return e.theme.colors.gray100}))),P=a.Ay.div.withConfig({componentId:"sc-ce33c832-7"})(f(),(function(e){return e.theme.colors.gray600}),(function(e){return e.theme.colors.gray300})),V=a.Ay.div.withConfig({componentId:"sc-ce33c832-8"})(h()),H=a.Ay.div.withConfig({componentId:"sc-ce33c832-9"})(g(),(function(e){return e.theme.colors.white}),(function(e){return e.theme.colors.primaryBase}),(function(e){return e.theme.colors.blue50}),(function(e){return e.theme.colors.yellow900}),(function(e){return e.theme.colors.yellow900})),U=a.Ay.div.withConfig({componentId:"sc-ce33c832-10"})(m()),G=a.Ay.div.withConfig({componentId:"sc-ce33c832-11"})(b(),(function(e){return e.theme.colors.neutral200}),(function(e){return e.theme.colors.gray800}),(function(e){return e.theme.sizes.fwRegular}),(function(e){return e.theme.colors.yellow900}),(function(e){return e.theme.colors.yellow900}),(function(e){return e.theme.colors.white}),(function(e){return e.theme.colors.yellow900}),(function(e){return e.theme.colors.yellow900}),(function(e){return e.theme.colors.white}),(function(e){return e.theme.colors.yellow900}),(function(e){return e.theme.colors.yellow900})),j=(a.Ay.div.withConfig({componentId:"sc-ce33c832-12"})(w(),(function(e){return e.theme.colors.neutral50})),a.Ay.div.withConfig({componentId:"sc-ce33c832-13"})(y(),(function(e){return e.theme.colors.neutral50}),(function(e){return e.theme.colors.gray400}))),Q=a.Ay.img.withConfig({componentId:"sc-ce33c832-14"})(x()),K=a.Ay.div.withConfig({componentId:"sc-ce33c832-15"})(k()),J=a.Ay.div.withConfig({componentId:"sc-ce33c832-16"})(C()),W=a.Ay.div.withConfig({componentId:"sc-ce33c832-17"})(A(),i.M.mbUp),q=a.Ay.div.withConfig({componentId:"sc-ce33c832-18"})(E(),(function(e){return e.theme.colors.gray200}),(function(e){return e.theme.colors.white}),(function(e){return e.theme.colors.blue200})),Z=a.Ay.div.withConfig({componentId:"sc-ce33c832-19"})(D(),(function(e){return e.theme.colors.primaryBase}),(function(e){return e.theme.colors.blue200})),X=a.Ay.ul.withConfig({componentId:"sc-ce33c832-20"})(T(),(function(e){return e.theme.colors.white}),(function(e){return e.theme.colors.gray200})),$=a.Ay.li.withConfig({componentId:"sc-ce33c832-21"})(S(),(function(e){return e.theme.colors.gray100})),ee=a.Ay.div.withConfig({componentId:"sc-ce33c832-22"})(M()),ne=(0,a.Ay)(r.a).withConfig({componentId:"sc-ce33c832-23"})(_()),te=a.Ay.div.withConfig({componentId:"sc-ce33c832-24"})(I(),(function(e){return e.theme.colors.gray600})),oe=a.Ay.div.withConfig({componentId:"sc-ce33c832-25"})(Y(),(function(e){return e.theme.colors.green500})),ie=a.Ay.div.withConfig({componentId:"sc-ce33c832-26"})(L())}}]);