"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2513],{iz81:function(e,i,a){a.d(i,{GE:function(){return g},ID:function(){return Z},IW:function(){return s},Kk:function(){return h},LS:function(){return p},MP:function(){return b},Ob:function(){return m},bQ:function(){return u},bp:function(){return f},cZ:function(){return d},nL:function(){return c},pf:function(){return w},qZ:function(){return v},yg:function(){return r}});var t=a("rBCA"),o=a("iBNF"),n=a("HMwR"),l=a("c212");let d=(0,t.Z)("div",{target:"e12jq2e0"})("padding:24px 16px;padding-bottom:40px;background:",o.r.colors.primary50,";&[data-less-card='false']{padding-right:16px;",n.M.mbUp,"{padding-bottom:40px;}}&[data-less-card='true']{",n.M.mbDown,"{padding-right:0px;}}",n.M.mbDown,"{padding-bottom:24px;margin-bottom:12px;margin-right:-1rem;margin-left:-1rem;}.container{.section{width:unset;.grid-layout{padding-right:24px;grid-column-gap:12px;height:100%;}}}.two-cards-list{display:flex;gap:12px;}.arrow-right{right:-15px;}.arrow-left{left:-15px;}.arrow-left,.arrow-right{background:white;border-radius:50%;cursor:pointer;svg{display:block;}}.doctor-title{display:flex;padding:16px 0;}.see-more{display:flex;width:30%;align-items:center;padding-left:8px;cursor:pointer;img{width:18px;height:18px;}}.service-heading{display:flex;justify-content:space-between;padding-bottom:16px;.see-more{width:25%;justify-content:flex-end;}}"),r=(0,t.Z)("div",{target:"e12jq2e1"})("display:flex;&::before{width:5px;margin-right:10px;background:",o.r.colors.primaryBase,";content:'';}p[data-size='lg']{line-height:26px;}"),c=(0,t.Z)("div",{target:"e12jq2e2"})("height:100%;width:270px;padding:16px;border:1px solid ",o.r.colors.neutral100,";background:white;border-radius:",o.r.borderRadius,";box-shadow:0px 4px 8px rgba(0,0,0,0.04),0px 0px 2px rgba(0,0,0,0.06),0px 0px 1px rgba(0,0,0,0.04);&[data-embedded-type='service']{min-height:280px;}&[data-embedded-type='doctor']{min-height:400px;[data-is-two-cards='true']{max-width:267px;}}&[data-embedded-type='hospital']{[data-is-two-cards='true']{max-width:267px;}}&[data-is-two-cards='true']{flex:1;}&[data-is-one-card='true']{width:100%;height:100%;}a{text-decoration:none;}.avatar{overflow:hidden;width:64px;height:64px;border-radius:50%;cursor:pointer;img{width:100%;height:auto;}}.name{padding-top:12px;cursor:pointer;p{display:inline-block;overflow:hidden;max-width:236px;font-weight:600;text-overflow:ellipsis;white-space:nowrap;}}.info{overflow:hidden;height:36px;}.doctor-tag{padding-top:12px;}.btn-booking{width:100%;margin-top:12px;margin-bottom:8px;}.btn-login-to-call{width:100%;height:40px;}.btn-call{width:100%;height:36px;border:none;}"),s=(0,t.Z)("div",{target:"e12jq2e3"})("padding-top:10px;border-bottom:1px dashed ",o.r.colors.neutral100,";"),p=(0,t.Z)("div",{target:"e12jq2e4"})("display:inline-block;padding:1px 12px;background:",o.r.colors.gray100,";border-radius:2px;"),h=(0,t.Z)("div",{target:"e12jq2e5"})("display:flex;flex:2;align-items:center;.icon-price{display:flex;flex-direction:column;justify-content:center;padding-right:8px;img{width:16px;height:16px;}}.text-price{padding-right:10px;}.price{font-weight:600;}&[data-type='hospital']{align-items:flex-start;.icon-price{padding-top:2px;}}.booking-list{display:inline-flex;margin-top:4px;li{padding-inline:8px;border-right:1px solid ",o.r.colors.gray200,";&:first-of-type{padding-left:0;}&:last-child{border-right:none;}}}&[data-is-one='true']{.booking-list{margin-top:0;margin-left:8px;}}"),m=(0,t.Z)("div",{target:"e12jq2e6"})("margin:12px -16px 0 -16px;background:",o.r.colors.neutral50,";cursor:pointer;.hospital-info{display:flex;padding:8px 16px;.logo{padding-right:8px;img{width:32px;height:32px;border-radius:50%;}}.hospital-detail{min-width:0;&[data-is-one-card='false']{p{display:inline-block;overflow:hidden;max-width:100%;text-overflow:ellipsis;white-space:nowrap;display:inline-block;max-width:100%;}}.hospital-address{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}.hospital-name{p{font-weight:600;}}.hospital-direction{display:flex;img{width:16px;height:16px;margin-right:8px;}}}}"),g=(0,t.Z)("div",{target:"e12jq2e7"})("display:flex;.service-logo{width:48px;height:48px;margin-right:18px;cursor:pointer;}.service-name{cursor:pointer;p{display:inline-block;overflow:hidden;max-width:170px;font-weight:600;text-overflow:ellipsis;white-space:nowrap;}}"),v=(0,t.Z)("div",{target:"e12jq2e8"})("display:inline-block;padding:1px 12px;background:",o.r.colors.green50,";border-radius:2px;"),u=(0,t.Z)("div",{target:"e12jq2e9"})("border:1px solid ",o.r.colors.neutral100,";background:white;border-radius:",o.r.borderRadius,";box-shadow:0px 4px 8px rgba(0,0,0,0.04),0px 0px 2px rgba(0,0,0,0.06),0px 0px 1px rgba(0,0,0,0.04);a{text-decoration:none;}.doctor-info{display:flex;padding:16px;.main-info{flex:1;padding:0 16px;.name{cursor:pointer;p{display:inline-block;overflow:hidden;max-width:236px;font-weight:600;text-overflow:ellipsis;white-space:nowrap;}}.doctor-tag{padding-top:12px;}}.avatar{overflow:hidden;width:80px;height:80px;border-radius:50%;cursor:pointer;img{width:100%;height:auto;}}}.service-info{display:flex;padding:16px;.service-detail{flex:1;padding:0 16px;.service-name{cursor:pointer;p{display:inline-block;overflow:hidden;max-width:236px;font-weight:600;text-overflow:ellipsis;white-space:nowrap;}}.doctor-tag{padding-top:12px;}}.service-logo{overflow:hidden;width:80px;height:80px;border-radius:50%;cursor:pointer;img{width:100%;height:auto;}}}.group-btn{width:226px;.btn-booking{width:100%;margin-top:12px;margin-bottom:8px;}.btn-login-to-call{width:100%;height:40px;}.btn-call{width:100%;height:36px;border:none;}}.avatar{img{width:64px;height:64px;}}.overview{flex-grow:1;}.action-group{display:flex;justify-content:flex-start;flex-direction:row-reverse;gap:16px;width:100%;padding:8px 16px;background-color:",o.r.colors.neutral50,";}"),b=(0,t.Z)("div",{target:"e12jq2e10"})("display:flex;justify-content:space-between;padding:12px 16px;background:",o.r.colors.neutral50,";.hospital-info{display:flex;flex:3;align-items:center;padding:8px 16px;.logo{padding-right:8px;cursor:pointer;img{width:32px;height:32px;border-radius:50%;}}.hospital-direction{display:flex;img{width:16px;height:16px;margin-right:8px;}}.hospital-detail{cursor:pointer;p{display:inline-block;overflow:hidden;max-width:250px;text-overflow:ellipsis;white-space:nowrap;}.hospital-name{p{font-weight:600;}}.hospital-direction{display:flex;img{width:16px;height:16px;margin-right:8px;}}}}"),f=(0,t.Z)(l.S,{target:"e12jq2e11"})(".container .section{margin:0;}"),w=(0,t.Z)("div",{target:"e12jq2e12"})("padding:1px 8px 1px 4px;background:",o.r.colors.neutral50,";border-radius:32px;display:inline-flex;align-items:center;justify-content:center;gap:4px;"),Z=(0,t.Z)("div",{target:"e12jq2e13"})("display:flex;flex-direction:column;height:100%;justify-content:space-between;.name{p{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal;}}.info{display:inline-flex;align-items:center;gap:2px;}.address{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:3;white-space:normal;overflow:hidden;text-overflow:ellipsis;}&[data-is-one='true']{display:flex;padding:16px;gap:16px;}.button-group{justify-self:flex-end;}")},"l+Th":function(e,i,a){a.r(i),a.d(i,{default:function(){return E}});var t,o,n=a("BGKE"),l=a("q1tI"),d=a("09QT"),r=a("/tR3"),c=a("oQBk"),s=a("Vitr"),p=a("mGnJ"),h=a("dDsW"),m=a("CJtR"),g=a("P5LW"),v=a("iz81"),careEmbedRecommendation_CareEmbedCard=e=>{let{children:i,dataDescription:a,dataEventAction:t,dataTitle:o,seeMoreSlug:d,type:r}=e,{locale:c}=(0,g.h)(),{formatMessage:u}=(0,h.Z)(),b=(0,l.useMemo)(()=>(0,m.UC)(c),[c]),f=(0,m.zs)({type:r,searchSlug:d,locale:c});return(0,n.BX)(n.HY,{children:[o&&(0,n.tZ)(v.yg,{className:"doctor-heading",children:(0,n.tZ)(s.T,{type:"bold",size:"lg",color:"#284A75",children:o})}),(0,n.BX)("div",{className:"doctor-title",children:[a&&(0,n.tZ)("div",{className:"title-text",children:(0,n.tZ)(s.T,{size:"xs",color:"#262626",children:a})}),(0,n.BX)("div",{className:"see-more",onClick:()=>{window.location.href=f},"data-event-category":"Care","data-event-action":t,"data-event-label":"".concat(b).concat(p.b).concat(f),children:[(0,n.tZ)(s.T,{size:"xs",color:"#2685F1",type:"bold",children:u({id:"articlePage.careEmbedding.seeMore",defaultMessage:"See more"})}),(0,n.tZ)("img",{loading:"lazy",src:"/images/chevronRightActive.svg",alt:""})]})]}),i]})},u=a("odgB"),b=a("a5vB"),f=a("raAP"),w=a("rIrU"),Z=a("Zr8O"),x=a("nXqV");(t=o||(o={}))[t.NONE=0]="NONE",t[t.CHILDREN=1]="CHILDREN",t[t.ADULTS=2]="ADULTS",t[t.BOTH=3]="BOTH";let renderStatus=(e,i)=>{switch(null==e?void 0:e.provideCare){case 1:return i({id:"articlePage.careEmbedding.forChildren",defaultMessage:"For children"});case 2:return i({id:"articlePage.careEmbedding.forAdult",defaultMessage:"For adult"});case 3:return i({id:"articlePage.careEmbedding.forAdult",defaultMessage:"For both adult and children"});default:return null}};var careEmbedRecommendation_OneItemCareDoctorRecommendation=e=>{var i,a,t,o,d;let{doctorInfo:r,cityId:c}=e,{formatMessage:p}=(0,h.Z)(),{setCareType:y,setData:C,setOpenQuickBookingDrawer:k}=(0,Z.B)(e=>({setCareType:e.setCareType,setOpenQuickBookingDrawer:e.setOpenQuickBookingDrawer,setData:e.setData}),b.X),{locale:E}=(0,g.h)(),D=(0,f.U)(),B="^".concat(r.id,"^^"),N=(0,l.useMemo)(()=>(0,m.UC)(E),[E]),A=r.doctorWebsite||(0,m.GT)({name:r.name,id:r.id,locale:E}),S=(0,m.D4)({name:null==r?void 0:null===(i=r.hospital)||void 0===i?void 0:i.name,id:null==r?void 0:null===(a=r.hospital)||void 0===a?void 0:a.id,locale:E}),handleMakeAppointment=()=>{let e={cityId:c||0,hospitalId:r.hospital.id,doctorId:r.id,specialtyId:r.doctorSpecialties[0].id};y(x.y.DOCTOR),C(e),k(!0)},T=!w.DY.includes(E);return(0,n.tZ)(v.bQ,{"data-embedded-type":"doctor",children:r&&(0,n.BX)(n.HY,{children:[(0,n.BX)("div",{className:"doctor-info",children:[(0,n.tZ)("div",{className:"avatar",onClick:handleMakeAppointment,children:(0,n.tZ)("img",{loading:"lazy",src:r.avatar,alt:"Avatar Doctor"})}),(0,n.BX)("div",{className:"main-info",children:[(0,n.tZ)("div",{className:"name",onClick:handleMakeAppointment,children:(0,n.tZ)(s.T,{size:"lg",children:r.name})}),(0,n.tZ)("div",{className:"info",children:(0,n.tZ)(s.T,{size:"n1",children:r.specialties})}),(0,n.tZ)("div",{className:"doctor-tag",children:(0,n.tZ)(v.LS,{children:(0,n.tZ)(s.T,{size:"c2",children:renderStatus(r,p)})})})]}),(0,n.BX)("div",{className:"group-btn",children:[(0,n.tZ)(u.B,{size:"md",color:"primary",className:"btn-booking",onClick:handleMakeAppointment,dataEventCategory:"Care",dataEventAction:"Embedded Doctor Appointment Click",dataEventLabel:"".concat(B).concat(D),children:p({id:"careBooking.bookAnAppointment",defaultMessage:"Book an appointment"})}),(0,n.tZ)("a",{href:A,target:r.doctorWebsite?"_blank":"_self",children:(0,n.tZ)(u.B,{size:"md",color:"secondary",className:"btn-booking",dataEventCategory:"Care",dataEventAction:"Embedded Doctor Detail Click",dataEventLabel:"".concat(B).concat(N).concat(w.sb).concat(A),children:p({id:"articlePage.careEmbedding.viewDetail",defaultMessage:"View Detail"})})})]})]}),(0,n.tZ)(v.IW,{}),(0,n.BX)(v.MP,{children:[T&&(0,n.BX)(v.Kk,{children:[(0,n.tZ)("div",{className:"icon-price",children:(0,n.tZ)("img",{loading:"lazy",src:"/svg/price.svg",alt:"Price"})}),(0,n.tZ)("div",{className:"text-price",children:(0,n.tZ)(s.T,{size:"c2",color:"#595959",children:p({id:"articlePage.careEmbedding.servicePrice",defaultMessage:"Service Price"})})}),(0,n.tZ)("div",{className:"price",children:(0,n.tZ)(s.T,{size:"c2",color:"#262626",children:"".concat(Intl.NumberFormat(E).format(parseInt(r.price))," ").concat(r.priceUnit)})})]}),(0,n.BX)("div",{className:"hospital-info",onClick:()=>{window.location.href=S},"data-event-category":"Care","data-event-action":"Embedded Doctor Get Direction Click","data-event-label":"".concat(B).concat(N).concat(w.sb).concat(S),children:[(0,n.tZ)("div",{className:"logo",children:(0,n.tZ)("img",{loading:"lazy",src:null===(t=r.hospital)||void 0===t?void 0:t.logo,alt:"Logo Hospital"})}),(0,n.BX)("div",{className:"hospital-detail",children:[(0,n.tZ)("div",{className:"hospital-name",children:(0,n.tZ)(s.T,{size:"n1",color:"#262626",children:null===(o=r.hospital)||void 0===o?void 0:o.name})}),(0,n.tZ)("div",{className:"hospital-address",children:(0,n.tZ)(s.T,{size:"n1",color:"#595959",children:null===(d=r.hospital)||void 0===d?void 0:d.address})})]}),(0,n.tZ)("div",{className:"get-direction",children:(0,n.BX)("div",{className:"hospital-direction",onClick:e=>{var i,a;e.stopPropagation(),window.location.href="/https://www.google.com/maps/search/?api=1&query=".concat(null===(i=r.hospital)||void 0===i?void 0:i.longitude,",").concat(null===(a=r.hospital)||void 0===a?void 0:a.latitude)},children:[(0,n.tZ)("img",{loading:"lazy",src:"/svg/direction.svg",alt:"Get direction"}),(0,n.tZ)(s.T,{size:"n1",color:"#2D87F3",children:p({id:"articlePage.careEmbedding.direction",defaultMessage:"Direction"})})]})})]})]})]})})},careEmbedRecommendation_SingleCareDoctorRecommendation=e=>{var i,a,t,o,d;let{doctorInfo:r,numberOfCards:c,cityId:p}=e,{formatMessage:y}=(0,h.Z)(),{locale:C}=(0,g.h)(),k=(0,f.U)(),{setCareType:E,setData:D,setOpenQuickBookingDrawer:B}=(0,Z.B)(e=>({setCareType:e.setCareType,setOpenQuickBookingDrawer:e.setOpenQuickBookingDrawer,setData:e.setData}),b.X),N="^".concat(r.id,"^^"),A=(0,l.useMemo)(()=>(0,m.UC)(C),[C]),handleMakeAppointment=()=>{if(r.doctorWebsite)window.open(r.doctorWebsite);else{let e={cityId:p||0,specialty:r.doctorSpecialties[0],doctor:r,hospital:r.hospital};E(x.y.DOCTOR),D(e),B(!0)}},S=(0,m.D4)({name:null==r?void 0:null===(i=r.hospital)||void 0===i?void 0:i.name,id:null==r?void 0:null===(a=r.hospital)||void 0===a?void 0:a.id,locale:C}),T=(0,m.GT)({name:r.name,id:r.id,locale:C}),z=!w.DY.includes(C);return(0,n.tZ)(v.nL,{"data-embedded-type":"doctor","data-is-two-cards":2===c,"data-is-one-card":1===c,children:r&&(0,n.BX)(n.HY,{children:[(0,n.tZ)("div",{className:"avatar",onClick:handleMakeAppointment,children:(0,n.tZ)("img",{loading:"lazy",src:r.avatar,alt:"Avatar Doctor"})}),(0,n.tZ)("div",{className:"name",onClick:handleMakeAppointment,children:(0,n.tZ)(s.T,{size:"lg",children:r.name})}),(0,n.tZ)("div",{className:"info",children:(0,n.tZ)(s.T,{size:"n1",children:r.specialties})}),(0,n.tZ)(v.IW,{}),(0,n.tZ)("div",{className:"doctor-tag",children:(0,n.tZ)(v.LS,{children:(0,n.tZ)(s.T,{size:"c2",children:renderStatus(r,y)})})}),z&&(0,n.BX)(v.Kk,{children:[(0,n.tZ)("div",{className:"icon-price",children:(0,n.tZ)("img",{loading:"lazy",src:"/svg/price.svg",alt:"Price"})}),(0,n.tZ)("div",{className:"text-price",children:(0,n.tZ)(s.T,{size:"c2",color:"#595959",children:y({id:"articlePage.careEmbedding.servicePrice",defaultMessage:"Service Price"})})}),(0,n.tZ)("div",{className:"price",children:(0,n.tZ)(s.T,{size:"c2",color:"#262626",children:"".concat(Intl.NumberFormat(C).format(parseInt(r.price))," ").concat(r.priceUnit)})})]}),(0,n.tZ)(v.Ob,{onClick:()=>{window.location.href=S},"data-event-category":"Care","data-event-action":"Embedded Doctor Get Direction Click","data-event-label":"".concat(N).concat(A).concat(w.sb).concat(S),children:(0,n.BX)("div",{className:"hospital-info",children:[(0,n.tZ)("div",{className:"logo",children:(0,n.tZ)("img",{loading:"lazy",src:null===(t=r.hospital)||void 0===t?void 0:t.logo,alt:"Logo Hospital"})}),(0,n.BX)("div",{className:"hospital-detail","data-is-one-card":1===c,"data-is-two-cards":2===c,children:[(0,n.tZ)("div",{className:"hospital-name",children:(0,n.tZ)(s.T,{size:"n1",color:"#262626",children:null===(o=r.hospital)||void 0===o?void 0:o.name})}),(0,n.tZ)("div",{className:"hospital-address",children:(0,n.tZ)(s.T,{size:"n1",color:"#595959",children:null===(d=r.hospital)||void 0===d?void 0:d.address})}),(0,n.BX)("div",{className:"hospital-direction",onClick:e=>{var i,a;e.stopPropagation(),window.location.href="/https://www.google.com/maps/search/?api=1&query=".concat(null===(i=r.hospital)||void 0===i?void 0:i.longitude,",").concat(null===(a=r.hospital)||void 0===a?void 0:a.latitude)},children:[(0,n.tZ)("img",{loading:"lazy",src:"/svg/direction.svg",alt:"Get direction"}),(0,n.tZ)(s.T,{size:"n1",color:"#2D87F3",children:y({id:"articlePage.careEmbedding.direction",defaultMessage:"Direction"})})]})]})]})}),(0,n.tZ)(u.B,{size:"md",color:"primary",className:"btn-booking",onClick:handleMakeAppointment,dataEventCategory:"Care",dataEventAction:"Embedded Doctor Appointment Click",dataEventLabel:"".concat(N).concat(k),children:y({id:"careBooking.bookAnAppointment",defaultMessage:"Book an appointment"})}),(0,n.tZ)("a",{href:T,children:(0,n.tZ)(u.B,{size:"md",color:"secondary",className:"btn-booking",dataEventCategory:"Care",dataEventAction:"Embedded Doctor Detail Click",dataEventLabel:"".concat(N).concat(A).concat(w.sb).concat(T),children:y({id:"articlePage.careEmbedding.viewDetail",defaultMessage:"View Detail"})})})]})})},doctor=e=>{let{type:i,isMobile:a,dataId:t,dataTitle:o,dataDescription:s,scrollColumns:p=2,scrollWidth:h=576,area:m="article",isDotsShown:g,onFetchCompleted:u}=e,[b,f]=(0,l.useState)([]),[w,Z]=(0,l.useState)(""),x=(0,l.useCallback)(async()=>{var e,a;let o=await (0,d.d)(c.y.CARE.GET_CARE_LIST_EMBEDDING,{params:{type:"doctors",id:"all"!==t?t:"",type_id:"specialty_id"}},"care"),n=(null==o?void 0:null===(a=o._data)||void 0===a?void 0:null===(e=a.doctors)||void 0===e?void 0:e.map(r.XR))||[],l=n.slice(0,4);f(l),u&&u(l,i)},[u]),y=(0,l.useCallback)(async()=>{let e=await (0,d.d)(c.y.CARE.GET_CARE_SPECIALTY_DETAIL,{params:{specialtyId:t}},"care");if((null==e?void 0:e._status)===1){var i,a;let{_data:t}=e;Z(null!==(a=null===(i=t.specialty)||void 0===i?void 0:i.slug)&&void 0!==a?a:"")}},[t]);(0,l.useEffect)(()=>{x(),y()},[]);let C=(0,l.useMemo)(()=>"boolean"==typeof g?g:!a&&b.length>2,[a,b.length,g]),renderDoctorsScrollList=()=>(0,n.tZ)(v.bp,{column:p,row:1,isDotsShown:C,mode:"infinity",type:"separated",isArrowShown:!a,customPageWidth:h,children:null==b?void 0:b.map((e,i)=>(0,n.tZ)(careEmbedRecommendation_SingleCareDoctorRecommendation,{doctorInfo:e,numberOfCards:b.length},i))});return(0,n.tZ)(n.HY,{children:(null==b?void 0:b.length)>0&&(0,n.tZ)(v.cZ,{"data-is-one-two-card":(null==b?void 0:b.length)<=2,children:b.length>0&&(0,n.tZ)(careEmbedRecommendation_CareEmbedCard,{dataDescription:s,dataEventAction:"Embedded Doctor See Next Click",dataTitle:o,seeMoreSlug:w,type:i,children:(()=>{if("sidebar"===m){if(1===b.length)return(0,n.tZ)(careEmbedRecommendation_SingleCareDoctorRecommendation,{doctorInfo:b[0],numberOfCards:1});if(b.length>=2)return renderDoctorsScrollList()}return 1===b.length?a?(0,n.tZ)(careEmbedRecommendation_SingleCareDoctorRecommendation,{doctorInfo:b[0],numberOfCards:1}):(0,n.tZ)(careEmbedRecommendation_OneItemCareDoctorRecommendation,{doctorInfo:b[0]}):2!==b.length||a?renderDoctorsScrollList():(0,n.tZ)("div",{className:"two-cards-list",children:b.map(e=>(0,n.tZ)(careEmbedRecommendation_SingleCareDoctorRecommendation,{doctorInfo:e,numberOfCards:2},e.id))})})()})})})},y=a("iBNF"),C=a("Zr3N"),careEmbedRecommendation_OneItemCareHospitalRecommendation=e=>{let{hospitalInfo:i}=e,{formatMessage:a}=(0,h.Z)(),{locale:t}=(0,g.h)(),o=(0,f.U)(),handleMakeAppointment=()=>null,[l]=(0,C.A)();return(0,n.BX)(v.bQ,{"data-embedded-type":"hospital",children:[i&&(0,n.BX)(v.ID,{"data-is-one":"true",children:[(0,n.tZ)("div",{className:"avatar",children:(0,n.tZ)("a",{href:(0,m.D4)({locale:t,id:i.id,name:i.name,slug:i.slug}),children:(0,n.tZ)("img",{loading:"lazy",src:i.logo,alt:"Avatar Doctor"})})}),(0,n.BX)("div",{className:"overview",children:[(0,n.tZ)("div",{className:"name",onClick:handleMakeAppointment,children:(0,n.tZ)("a",{href:(0,m.D4)({locale:t,id:i.id,name:i.name,slug:i.slug}),children:(0,n.tZ)(s.T,{size:"lg",children:i.name})})}),(0,n.BX)("div",{className:"info",children:[(0,n.BX)(v.pf,{children:[(0,n.tZ)("svg",{width:"16",height:"16",fill:"none",viewBox:"0 0 16 16",children:(0,n.tZ)("path",{fill:"#FFB521",d:"M8 11.513l3.447 2.08a.335.335 0 00.5-.36l-.913-3.92 3.04-2.633a.335.335 0 00-.194-.587l-4.006-.34L8.307 2.06a.332.332 0 00-.613 0L6.127 5.753l-4.007.34a.334.334 0 00-.186.587l3.04 2.633-.914 3.92a.335.335 0 00.5.36L8 11.513z"})}),(0,n.BX)(s.T,{size:"s4",type:"semiBold",children:[Intl.NumberFormat("en-US",{minimumFractionDigits:0,maximumFractionDigits:1}).format(Number(i.rating)),"/5"]})]}),(0,n.BX)(s.T,{size:"s4",color:y.r.colors.gray600,style:{textDecorationLine:"underline"},children:[i.totalReviews||0," Patient Stories"]})]}),(0,n.BX)(v.Kk,{style:{marginTop:"8px"},as:"a","data-type":"hospital",href:"https://www.google.com/maps/search/?api=1&query=".concat(i.longitude,",").concat(i.latitude),children:[(0,n.tZ)("div",{className:"icon-price",children:(0,n.tZ)("svg",{width:"16",height:"16",fill:"none",viewBox:"0 0 16 16",children:(0,n.tZ)("path",{fill:"#8C8C8C",d:"M8 1.333A4.667 4.667 0 003.333 6c0 2.644 2.936 6.547 4.151 8.047.267.33.765.33 1.032 0 1.215-1.5 4.15-5.403 4.15-8.047A4.667 4.667 0 008 1.333zm0 6.334a1.666 1.666 0 110-3.333 1.666 1.666 0 010 3.333z"})})}),(0,n.tZ)("div",{className:"text-price",children:(0,n.tZ)(s.T,{size:"p4",color:y.r.colors.gray600,className:"address",children:i.address})})]}),(0,n.BX)(v.Kk,{"data-type":"hospital","data-is-one":"true",style:{marginTop:"8px"},children:[(0,n.tZ)("div",{className:"icon-price",children:(0,n.tZ)("svg",{width:"16",height:"16",fill:"none",viewBox:"0 0 16 16",children:(0,n.tZ)("path",{fill:"#8C8C8C",d:"M8 1.333A6.663 6.663 0 002.667 4h1.812A5.348 5.348 0 018 2.667c1.31 0 2.56.49 3.521 1.333h1.813A6.663 6.663 0 008 1.333zM2.23 4.668c-.568 1.765-.897 3.812-.897 6 0 1.4.128 2.747.375 4h12.584c.247-1.253.375-2.6.375-4 0-2.188-.328-4.235-.896-6H2.229zm5.77 2a3.333 3.333 0 110 6.666 3.333 3.333 0 010-6.666zM7.333 8v1.334H6v1.333h1.333V12h1.334v-1.333H10V9.334H8.667V8H7.334z"})})}),(0,n.tZ)("div",{className:"text-price",children:(0,n.BX)(s.T,{size:"p4",color:y.r.colors.gray600,children:["Available for booking:",(0,n.BX)("ul",{className:"booking-list",children:[i.totalAvailableDoctors>0&&(0,n.tZ)("li",{children:(0,n.tZ)("a",{href:"".concat((0,m.D4)({locale:t,id:i.id,name:i.name,slug:i.slug}),"?tab=").concat(l.doctors),children:(0,n.tZ)(s.T,{size:"p4",color:y.r.colors.primaryBase,children:"Doctors"})})}),i.totalAvailableServices>0&&(0,n.tZ)("li",{children:(0,n.tZ)("a",{href:"".concat((0,m.D4)({locale:t,id:i.id,name:i.name,slug:i.slug}),"?tab=").concat(l.services),children:(0,n.tZ)(s.T,{size:"p4",color:y.r.colors.primaryBase,children:"Services"})})})]})]})})]})]})]}),(0,n.BX)("div",{className:"action-group",children:[(0,n.tZ)(u.B,{size:"md",color:"primary",className:"btn-booking",onClick:handleMakeAppointment,dataEventCategory:"Care",dataEventAction:"Embedded Doctor Appointment Click",dataEventLabel:o,children:a({id:"careBooking.bookAnAppointment",defaultMessage:"Book now"})}),(0,n.tZ)("a",{href:(0,m.D4)({locale:t,id:i.id,name:i.name,slug:i.slug}),children:(0,n.tZ)(u.B,{size:"md",color:"secondary",className:"btn-booking",dataEventCategory:"Care",dataEventAction:"Embedded Doctor Detail Click",dataEventLabel:o,children:a({id:"articlePage.careEmbedding.viewDetail",defaultMessage:"View Detail"})})})]})]})},careEmbedRecommendation_SingleCareHospitalRecommendation=e=>{let{hospitalInfo:i,numberOfCards:a,cityId:t}=e,{formatMessage:o}=(0,h.Z)(),{locale:l}=(0,g.h)(),r=(0,f.U)(),{setCareType:p,setData:w,setOpenQuickBookingDrawer:k}=(0,Z.B)(e=>({setCareType:e.setCareType,setOpenQuickBookingDrawer:e.setOpenQuickBookingDrawer,setData:e.setData}),b.X),handleMakeAppointment=async()=>{if(i.id){var e,a,o,n,l,r;let s=await (0,d.d)(c.y.CARE.GET_HOSPITAL_DETAIL,{params:{id:i.id}},"care"),h=s._data.branch,m=await (0,d.d)(c.y.CARE.GET_BRANCH_DETAIL,{params:{id:i.id,type:i.totalAvailableDoctors>0?"doctor":"service"}},"care"),g=null==m?void 0:null===(e=m._data)||void 0===e?void 0:e.searches;if(null==g?void 0:g[0]){if(i.totalAvailableDoctors>0){let e={cityId:t||0,specialty:g[0].specialties_transform[0],doctor:g[0],hospital:g[0].hospital_branch};p(x.y.DOCTOR),w(e),k(!0)}else if(h.total_available_service>0){let e={cityId:t||0,serviceType:{id:g[0].service_id,name:g[0].name,logo:g[0].logo,slug:g[0].slug},service:{id:null===(a=g[0].hospital_branch)||void 0===a?void 0:a.id,name:null===(o=g[0].hospital_branch)||void 0===o?void 0:o.name,logo:null===(n=g[0].hospital_branch)||void 0===n?void 0:n.logo,price:null===(l=g[0].hospital_branch)||void 0===l?void 0:l.price,priceUnit:(null===(r=g[0].hospital_branch)||void 0===r?void 0:r.price_unit)||"",serviceId:g[0].id}};p(x.y.DOCTOR),w(e),k(!0)}}}},[E]=(0,C.A)();return(0,n.tZ)(v.nL,{"data-embedded-type":"hospital","data-is-two-cards":2===a,"data-is-one-card":1===a,children:i&&(0,n.BX)(v.ID,{children:[(0,n.BX)("div",{children:[(0,n.tZ)("div",{className:"avatar",children:(0,n.tZ)("a",{href:(0,m.D4)({locale:l,id:i.id,name:i.name,slug:i.slug}),children:(0,n.tZ)("img",{loading:"lazy",src:i.logo,alt:"Avatar Doctor"})})}),(0,n.tZ)("div",{className:"name",onClick:handleMakeAppointment,children:(0,n.tZ)("a",{href:(0,m.D4)({locale:l,id:i.id,name:i.name,slug:i.slug}),"data-event-category":"Care","data-event-action":"Embedded Hospital - Name Click","data-event-label":r,children:(0,n.tZ)(s.T,{size:"lg",children:i.name})})})]}),(0,n.BX)("div",{className:"info-wrapper",children:[(0,n.BX)("div",{className:"info",children:[(0,n.BX)(v.pf,{children:[(0,n.tZ)("svg",{width:"16",height:"16",fill:"none",viewBox:"0 0 16 16",children:(0,n.tZ)("path",{fill:"#FFB521",d:"M8 11.513l3.447 2.08a.335.335 0 00.5-.36l-.913-3.92 3.04-2.633a.335.335 0 00-.194-.587l-4.006-.34L8.307 2.06a.332.332 0 00-.613 0L6.127 5.753l-4.007.34a.334.334 0 00-.186.587l3.04 2.633-.914 3.92a.335.335 0 00.5.36L8 11.513z"})}),(0,n.BX)(s.T,{size:"s4",type:"semiBold",children:[Intl.NumberFormat("en-US",{minimumFractionDigits:0,maximumFractionDigits:1}).format(Number(i.rating)),"/5"]})]}),(0,n.BX)(s.T,{size:"s4",color:y.r.colors.gray600,style:{textDecorationLine:"underline"},children:[i.totalReviews||0," Patient Stories"]})]}),(0,n.BX)(v.Kk,{as:"a","data-type":"hospital",href:"https://www.google.com/maps/search/?api=1&query=".concat(i.longitude,",").concat(i.latitude),"data-event-category":"Care","data-event-action":"Embedded Hospital Get Direction Click","data-event-label":r,children:[(0,n.tZ)("div",{className:"icon-price",children:(0,n.tZ)("svg",{width:"16",height:"16",fill:"none",viewBox:"0 0 16 16",children:(0,n.tZ)("path",{fill:"#8C8C8C",d:"M8 1.333A4.667 4.667 0 003.333 6c0 2.644 2.936 6.547 4.151 8.047.267.33.765.33 1.032 0 1.215-1.5 4.15-5.403 4.15-8.047A4.667 4.667 0 008 1.333zm0 6.334a1.666 1.666 0 110-3.333 1.666 1.666 0 010 3.333z"})})}),(0,n.tZ)("div",{className:"text-price",children:(0,n.tZ)(s.T,{size:"p4",color:y.r.colors.gray600,className:"address",children:i.address})})]}),(0,n.BX)(v.Kk,{"data-type":"hospital",style:{marginTop:"8px"},children:[(0,n.tZ)("div",{className:"icon-price",children:(0,n.tZ)("svg",{width:"16",height:"16",fill:"none",viewBox:"0 0 16 16",children:(0,n.tZ)("path",{fill:"#8C8C8C",d:"M8 1.333A6.663 6.663 0 002.667 4h1.812A5.348 5.348 0 018 2.667c1.31 0 2.56.49 3.521 1.333h1.813A6.663 6.663 0 008 1.333zM2.23 4.668c-.568 1.765-.897 3.812-.897 6 0 1.4.128 2.747.375 4h12.584c.247-1.253.375-2.6.375-4 0-2.188-.328-4.235-.896-6H2.229zm5.77 2a3.333 3.333 0 110 6.666 3.333 3.333 0 010-6.666zM7.333 8v1.334H6v1.333h1.333V12h1.334v-1.333H10V9.334H8.667V8H7.334z"})})}),(0,n.BX)("div",{className:"text-price",children:[(0,n.tZ)(s.T,{size:"p4",color:y.r.colors.gray600,children:"Available for booking:"}),(0,n.BX)("ul",{className:"booking-list",children:[i.totalAvailableDoctors>0&&(0,n.tZ)("li",{children:(0,n.tZ)("a",{href:"".concat((0,m.D4)({locale:l,id:i.id,name:i.name,slug:i.slug}),"?tab=").concat(E.doctors),"data-event-category":"Care","data-event-action":"Embedded Hospital - Booking Type Click","data-event-label":r,children:(0,n.tZ)(s.T,{size:"p4",color:y.r.colors.primaryBase,children:"Doctors"})})}),i.totalAvailableServices>0&&(0,n.tZ)("li",{children:(0,n.tZ)("a",{href:"".concat((0,m.D4)({locale:l,id:i.id,name:i.name,slug:i.slug}),"?tab=").concat(E.services),"data-event-category":"Care","data-event-action":"Embedded Hospital - Booking Type Click","data-event-label":r,children:(0,n.tZ)(s.T,{size:"p4",color:y.r.colors.primaryBase,children:"Services"})})})]})]})]})]}),(0,n.BX)("div",{className:"button-group",children:[(0,n.tZ)(u.B,{size:"md",color:"primary",className:"btn-booking",onClick:handleMakeAppointment,dataEventCategory:"Care",dataEventAction:"Embedded Hospital Appointment Click",dataEventLabel:r,children:o({id:"careBooking.bookAnAppointment",defaultMessage:"Book now"})}),(0,n.tZ)("a",{href:(0,m.D4)({locale:l,id:i.id,name:i.name,slug:i.slug}),"data-event-category":"Care","data-event-action":"Embedded Hospital Detail Click","data-event-label":r,children:(0,n.tZ)(u.B,{size:"md",color:"secondary",className:"btn-booking",children:o({id:"articlePage.careEmbedding.viewDetail",defaultMessage:"View Detail"})})})]})]})})},hospital=e=>{let{type:i,isMobile:a,dataId:t,dataTitle:o,dataDescription:s,scrollColumns:p=2,scrollWidth:h=576,area:m="article",isDotsShown:g,onFetchCompleted:u}=e,[b,f]=(0,l.useState)([]),[w,Z]=(0,l.useState)(""),x=(0,l.useCallback)(async()=>{var e,a;let o=await (0,d.d)(c.y.CARE.GET_CARE_LIST_EMBEDDING,{params:{type:"hospital/branches",id:"all"!==t?t:"",type_id:"specialty_id"}},"care"),n=(null==o?void 0:null===(a=o._data)||void 0===a?void 0:null===(e=a.branches)||void 0===e?void 0:e.map(r.ZL))||[],l=n.slice(0,4);f(l),u&&u(l,i)},[u]),y=(0,l.useCallback)(async()=>{let e=await (0,d.d)(c.y.CARE.GET_CARE_SPECIALTY_DETAIL,{params:{specialtyId:t}},"care");if((null==e?void 0:e._status)===1){var i,a;let{_data:t}=e;Z(null!==(a=null===(i=t.specialty)||void 0===i?void 0:i.slug)&&void 0!==a?a:"")}},[t]);(0,l.useEffect)(()=>{x(),y()},[]);let C=(0,l.useMemo)(()=>"boolean"==typeof g?g:!a&&b.length>2,[a,b.length,g]),renderHospitalsScrollList=()=>(0,n.tZ)(v.bp,{column:p,row:1,isDotsShown:C,mode:"infinity",type:"separated",isArrowShown:!a,customPageWidth:h,children:null==b?void 0:b.map((e,i)=>(0,n.tZ)(careEmbedRecommendation_SingleCareHospitalRecommendation,{hospitalInfo:e,numberOfCards:b.length},i))});return(0,n.tZ)(n.HY,{children:(null==b?void 0:b.length)>0&&(0,n.tZ)(v.cZ,{"data-is-one-two-card":(null==b?void 0:b.length)<=2,children:b.length>0&&(0,n.tZ)(careEmbedRecommendation_CareEmbedCard,{dataDescription:s,dataEventAction:"Embedded Hospital See More Click",dataTitle:o,seeMoreSlug:w,type:i,children:(()=>{if("sidebar"===m){if(1===b.length)return(0,n.tZ)(careEmbedRecommendation_SingleCareHospitalRecommendation,{hospitalInfo:b[0],numberOfCards:1});if(b.length>=2)return renderHospitalsScrollList()}return 1===b.length?a?(0,n.tZ)(careEmbedRecommendation_SingleCareHospitalRecommendation,{hospitalInfo:b[0],numberOfCards:1}):(0,n.tZ)(careEmbedRecommendation_OneItemCareHospitalRecommendation,{hospitalInfo:b[0]}):2!==b.length||a?renderHospitalsScrollList():(0,n.tZ)("div",{className:"two-cards-list",children:b.map(e=>(0,n.tZ)(careEmbedRecommendation_SingleCareHospitalRecommendation,{hospitalInfo:e,numberOfCards:2},e.id))})})()})})})},k=a("c212"),careEmbedRecommendation_OneItemCareServiceRecommendation=e=>{var i,a,t,o,d;let{serviceInfo:r,cityId:c}=e,{formatMessage:p}=(0,h.Z)(),{setCareType:y,setData:C,setOpenQuickBookingDrawer:k}=(0,Z.B)(e=>({setCareType:e.setCareType,setOpenQuickBookingDrawer:e.setOpenQuickBookingDrawer,setData:e.setData}),b.X),{locale:E}=(0,g.h)(),D=(0,f.U)(),B="^^".concat(r.serviceId,"^"),N=(0,l.useMemo)(()=>(0,m.UC)(E),[E]),handleMakeAppointment=()=>{let e={cityId:c||0,hospitalId:r.hospital.id,serviceId:r.serviceId};y(x.y.SERVICE),C(e),k(!0)},A=(0,m.D4)({name:null===(i=r.hospital)||void 0===i?void 0:i.name,id:null===(a=r.hospital)||void 0===a?void 0:a.id,locale:E}),S=(0,m.wV)({name:null==r?void 0:r.name,id:null==r?void 0:r.id,locale:E}),handleClickHospital=()=>{window.location.href=A};return(0,n.BX)(v.bQ,{"data-embedded-type":"service",children:[(0,n.BX)("div",{className:"service-info",children:[(0,n.tZ)("div",{className:"service-logo",onClick:handleMakeAppointment,children:(0,n.tZ)("img",{loading:"lazy",src:"https://cdn-healthcare.hellohealthgroup.com/2021/11/1636963243_619213ab2d91e3.52220855.png",alt:"Logo Service"})}),(0,n.BX)("div",{className:"service-detail",children:[(0,n.tZ)("div",{className:"service-name",onClick:handleMakeAppointment,children:(0,n.tZ)(s.T,{size:"lg",children:null==r?void 0:r.name})}),(0,n.tZ)(v.qZ,{children:(0,n.tZ)(s.T,{size:"c2",children:p({id:"articlePage.careEmbedding.available",defaultMessage:"Available"})})})]}),(0,n.BX)("div",{className:"group-btn",children:[(0,n.tZ)(u.B,{size:"md",color:"primary",className:"btn-booking",onClick:handleMakeAppointment,dataEventCategory:"Care",dataEventAction:"Embedded Service Appointment Click",dataEventLabel:"".concat(B).concat(D),children:p({id:"articlePage.careEmbedding.bookService",defaultMessage:"Book Service"})}),(0,n.tZ)("a",{href:S,children:(0,n.tZ)(u.B,{size:"md",color:"secondary",className:"btn-booking",dataEventCategory:"Care",dataEventAction:"Embedded Service Detail Click",dataEventLabel:"".concat(B).concat(N).concat(w.sb).concat(S),children:p({id:"articlePage.careEmbedding.viewDetail",defaultMessage:"View detail"})})})]})]}),(0,n.BX)(v.MP,{children:[(0,n.BX)(v.Kk,{children:[(0,n.tZ)("div",{className:"icon-price",children:(0,n.tZ)("img",{loading:"lazy",src:"/svg/price.svg",alt:"Price"})}),(0,n.tZ)("div",{className:"text-price",children:(0,n.tZ)(s.T,{size:"c2",color:"#595959",children:p({id:"articlePage.careEmbedding.servicePrice",defaultMessage:"Service Price"})})}),(0,n.tZ)("div",{className:"price",children:(0,n.tZ)(s.T,{size:"c2",color:"#262626",children:"".concat(Intl.NumberFormat(E).format(parseInt(null==r?void 0:r.price))," ").concat(null==r?void 0:r.priceUnit)})})]}),(0,n.BX)("div",{className:"hospital-info",children:[(0,n.tZ)("div",{className:"logo",onClick:handleClickHospital,children:(0,n.tZ)("img",{loading:"lazy",src:null==r?void 0:null===(t=r.hospital)||void 0===t?void 0:t.logo,alt:"Logo Hospital"})}),(0,n.BX)("div",{className:"hospital-detail",onClick:handleClickHospital,children:[(0,n.tZ)("div",{className:"hospital-name",children:(0,n.tZ)(s.T,{size:"n1",color:"#262626",children:null==r?void 0:null===(o=r.hospital)||void 0===o?void 0:o.name})}),(0,n.tZ)("div",{className:"hospital-address",children:(0,n.tZ)(s.T,{size:"n1",color:"#595959",children:null==r?void 0:null===(d=r.hospital)||void 0===d?void 0:d.address})})]}),(0,n.tZ)("div",{className:"get-direction",children:(0,n.BX)("div",{className:"hospital-direction",onClick:e=>{var i,a;e.stopPropagation(),window.location.href="/https://www.google.com/maps/search/?api=1&query=".concat(null==r?void 0:null===(i=r.hospital)||void 0===i?void 0:i.longitude,",").concat(null==r?void 0:null===(a=r.hospital)||void 0===a?void 0:a.latitude)},children:[(0,n.tZ)("img",{loading:"lazy",src:"/svg/direction.svg",alt:"Get direction"}),(0,n.tZ)(s.T,{size:"n1",color:"#2D87F3",children:p({id:"articlePage.careEmbedding.direction",defaultMessage:"Direction"})})]})})]})]})]})},careEmbedRecommendation_SingleCareServiceRecommendation=e=>{var i,a,t,o,d;let{serviceInfo:r,numberOfCards:c,cityId:p}=e,{formatMessage:y}=(0,h.Z)(),{locale:C}=(0,g.h)(),k=(0,f.U)(),{setCareType:E,setData:D,setOpenQuickBookingDrawer:B}=(0,Z.B)(e=>({setCareType:e.setCareType,setOpenQuickBookingDrawer:e.setOpenQuickBookingDrawer,setData:e.setData}),b.X),N="^^".concat(r.serviceId,"^"),A=(0,l.useMemo)(()=>(0,m.UC)(C),[C]),handleMakeAppointment=()=>{let e={cityId:p||0,serviceType:{id:r.serviceId,name:r.name,logo:r.logo,slug:r.slug},service:{id:r.hospital.id,name:r.hospital.name,logo:r.hospital.logo,price:r.price,priceUnit:r.priceUnit,serviceId:r.id}};E(x.y.SERVICE),D(e),B(!0)},S=(0,m.D4)({name:null==r?void 0:null===(i=r.hospital)||void 0===i?void 0:i.name,id:null==r?void 0:null===(a=r.hospital)||void 0===a?void 0:a.id,locale:C}),T=(0,m.wV)({name:null==r?void 0:r.name,id:null==r?void 0:r.id,locale:C});return(0,n.tZ)(v.nL,{"data-embedded-type":"service","data-is-two-cards":2===c,"data-is-one-card":1===c,children:r&&(0,n.BX)(n.HY,{children:[(0,n.BX)(v.GE,{children:[(0,n.tZ)("div",{className:"service-logo",onClick:handleMakeAppointment,children:(0,n.tZ)("img",{loading:"lazy",src:"https://cdn-healthcare.hellohealthgroup.com/2021/11/1636963243_619213ab2d91e3.52220855.png",alt:"Logo Service"})}),(0,n.BX)("div",{className:"service-detail",children:[(0,n.tZ)("div",{className:"service-name",onClick:handleMakeAppointment,children:(0,n.tZ)(s.T,{size:"lg",children:null==r?void 0:r.name})}),(0,n.tZ)(v.qZ,{children:(0,n.tZ)(s.T,{size:"c2",children:y({id:"articlePage.careEmbedding.available",defaultMessage:"Available"})})})]})]}),(0,n.tZ)(v.Ob,{onClick:()=>{window.location.href=S},"data-event-category":"Care","data-event-action":"Embedded Service Get Direction Click","data-event-label":"".concat(N).concat(A).concat(w.sb).concat(S),children:(0,n.BX)("div",{className:"hospital-info",children:[(0,n.tZ)("div",{className:"logo",children:(0,n.tZ)("img",{loading:"lazy",src:null==r?void 0:null===(t=r.hospital)||void 0===t?void 0:t.logo,alt:"Logo Hospital"})}),(0,n.BX)("div",{className:"hospital-detail","data-is-one-card":1===c,"data-is-two-cards":2===c,children:[(0,n.tZ)("div",{className:"hospital-name",children:(0,n.tZ)(s.T,{size:"n1",color:"#262626",children:null==r?void 0:null===(o=r.hospital)||void 0===o?void 0:o.name})}),(0,n.tZ)("div",{className:"hospital-address",children:(0,n.tZ)(s.T,{size:"n1",color:"#595959",children:null==r?void 0:null===(d=r.hospital)||void 0===d?void 0:d.address})}),(0,n.BX)("div",{className:"hospital-direction",onClick:e=>{var i,a;e.stopPropagation(),window.location.href="/https://www.google.com/maps/search/?api=1&query=".concat(null==r?void 0:null===(i=r.hospital)||void 0===i?void 0:i.longitude,",").concat(null==r?void 0:null===(a=r.hospital)||void 0===a?void 0:a.latitude)},children:[(0,n.tZ)("img",{loading:"lazy",src:"/svg/direction.svg",alt:"Get direction"}),(0,n.tZ)(s.T,{size:"n1",color:"#2D87F3",children:y({id:"articlePage.careEmbedding.direction",defaultMessage:"Direction"})})]})]})]})}),(0,n.BX)(v.Kk,{children:[(0,n.tZ)("div",{className:"icon-price",children:(0,n.tZ)("img",{loading:"lazy",src:"/svg/price.svg",alt:"Price"})}),(0,n.tZ)("div",{className:"text-price",children:(0,n.tZ)(s.T,{size:"c2",color:"#595959",children:y({id:"articlePage.careEmbedding.servicePrice",defaultMessage:"Service Price"})})}),(0,n.tZ)("div",{className:"price",children:(0,n.tZ)(s.T,{size:"c2",color:"#262626",children:"".concat(Intl.NumberFormat(C).format(parseInt(null==r?void 0:r.price))," ").concat(null==r?void 0:r.priceUnit)})})]}),(0,n.tZ)(u.B,{size:"md",color:"primary",className:"btn-booking",onClick:handleMakeAppointment,dataEventCategory:"Care",dataEventAction:"Embedded Service Appointment Click",dataEventLabel:"".concat(N).concat(k),children:y({id:"articlePage.careEmbedding.bookService",defaultMessage:"Book Service"})}),(0,n.tZ)("a",{href:T,children:(0,n.tZ)(u.B,{size:"md",color:"secondary",className:"btn-booking",dataEventCategory:"Care",dataEventAction:"Embedded Service Detail Click",dataEventLabel:"".concat(N).concat(A).concat(w.sb).concat(T),children:y({id:"articlePage.careEmbedding.viewDetail",defaultMessage:"View detail"})})})]})})},service=e=>{let{type:i,isMobile:a,dataId:t,dataTitle:o,dataDescription:s,scrollColumns:p=2,scrollWidth:h=576,area:m="article",isDotsShown:g,onFetchCompleted:u}=e,[b,f]=(0,l.useState)([]),[w,Z]=(0,l.useState)(""),x=(0,l.useCallback)(async()=>{var e,a;let o=await (0,d.d)(c.y.CARE.GET_CARE_LIST_EMBEDDING,{params:{type:"hospital/services",id:"all"!==t?t:"",type_id:"service_id"}},"care"),n=(null==o?void 0:null===(a=o._data)||void 0===a?void 0:null===(e=a.services)||void 0===e?void 0:e.map(r.Yo))||[],l=n.slice(0,4);f(l),u&&u(l,i)},[u]),y=(0,l.useCallback)(async()=>{let e=await (0,d.d)(c.y.CARE.GET_CARE_SERVICE_TYPE_DETAIL,{params:{serviceTypeId:t}},"care");if((null==e?void 0:e._status)===1){var i,a;let{_data:t}=e;Z(null!==(a=null===(i=t.service_types)||void 0===i?void 0:i.slug)&&void 0!==a?a:"")}},[t]);(0,l.useEffect)(()=>{x(),y()},[]);let C=(0,l.useMemo)(()=>"boolean"==typeof g?g:!a&&b.length>2,[a,b.length,g]),renderServicesScrollList=()=>(0,n.tZ)(k.S,{column:p,row:1,isDotsShown:C,mode:"infinity",type:"separated",isArrowShown:!a,customPageWidth:h,children:null==b?void 0:b.map(e=>(0,n.tZ)(careEmbedRecommendation_SingleCareServiceRecommendation,{serviceInfo:e},e.id))});return(0,n.tZ)(n.HY,{children:(null==b?void 0:b.length)>0&&(0,n.tZ)(v.cZ,{"data-is-one-two-card":(null==b?void 0:b.length)<=2,children:b.length>0&&(0,n.tZ)(careEmbedRecommendation_CareEmbedCard,{dataDescription:s,dataEventAction:"Embedded Doctor See Next Click",dataTitle:o,seeMoreSlug:w,type:i,children:(()=>{if("sidebar"===m){if(1===b.length)return(0,n.tZ)(careEmbedRecommendation_SingleCareServiceRecommendation,{serviceInfo:b[0],numberOfCards:1});if(b.length>=2)return renderServicesScrollList()}return 1===b.length?a?(0,n.tZ)(careEmbedRecommendation_SingleCareServiceRecommendation,{serviceInfo:b[0],numberOfCards:1}):(0,n.tZ)(careEmbedRecommendation_OneItemCareServiceRecommendation,{serviceInfo:b[0]}):2!==b.length||a?renderServicesScrollList():(0,n.tZ)("div",{className:"two-cards-list",children:null==b?void 0:b.map((e,i)=>(0,n.tZ)(careEmbedRecommendation_SingleCareServiceRecommendation,{serviceInfo:e,numberOfCards:2},i))})})()})})})};let CareEmbedRecommendation=e=>(()=>{switch(e.type){case"doctor":return(0,n.tZ)(doctor,{...e});case"service":return(0,n.tZ)(service,{...e});case"hospital":return(0,n.tZ)(hospital,{...e});default:return null}})();CareEmbedRecommendation.Doctor=doctor,CareEmbedRecommendation.Service=service,CareEmbedRecommendation.Hospital=hospital;var E=CareEmbedRecommendation}}]);