"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3331],{43331:function(e,i,t){t.d(i,{Z:function(){return ed}});var l=t(82729),n=t(35944),r=t(67294),o=t(70917),a=t(66455),d=t(84657),c=t(8882),s=t(64641),p=t(27625),h=t(11526),u=t(1092),v=t(38068),x=t(44594),f=t(69497),g=t(33463),w=t(18145),m=t(34665),b=t(4188),Z=t(30337),_=t(24881),k=t(69767),B=t(57404),y=t(68032),C=t(39565),V=t(46282),z=t(27734);let P=(0,o.iv)("height:30px;border-radius:5px;min-width:105px;cursor:pointer;background-color:",m.wL.blue3,";border:none;outline-width:0;font-size:14px;padding:0 6px;",m._Q.tablet,"{min-width:88px;}",m._Q.tablet_lg,"{min-width:90px;}"),L=(0,o.iv)(m.I8," justify-content:center;color:",m.wL.white,";font-weight:600;font-size:12px;letter-spacing:0.5px;position:relative;",m._Q.tablet,"{font-size:11px;}"),I=(0,o.iv)("display:flex;justify-content:center;align-items:center;width:100%;"),R=(0,o.iv)("border-left:1px solid ",m.wL.white,";height:30px;padding-left:5px;margin-left:5px;position:relative;max-width:21px;"),X=(0,o.iv)(m.I8," font-size:12px;font-weight:500;line-height:15px;color:",m.wL.white,";",m._Q.tablet,"{font-size:11px;}",m._Q.tablet_lg,"{font-size:11px;}");var S=(0,r.memo)(function(e){let{buttonCss:i,disabled:t,providerId:l,phoneNumber:o,handleOnExit:d,facilityItem:s,handleOpenPopover:p,handleClosePopover:h,handleOnPhoneCall:u,position:v,page:x,providerWidget:f}=e,w=(0,r.useMemo)(()=>{var e,i,t,l,n,r;let o=null==s?void 0:null===(i=s.deals)||void 0===i?void 0:null===(e=i.heroPrice)||void 0===e?void 0:e.providerId,a=null==s?void 0:null===(l=s.deals)||void 0===l?void 0:null===(t=l.bestPrice)||void 0===t?void 0:t.providerId,d=null==s?void 0:null===(r=s.deals)||void 0===r?void 0:null===(n=r.alternativePrice)||void 0===n?void 0:n.providerId;return o!==a&&!!a||o!==d&&!!d},[s]),[Z,_]=(0,r.useState)(!1),k=(0,r.useRef)(null);return(0,b.H)(k,()=>_(!1),[]),(0,n.tZ)("button",{disabled:t,css:[P,i],children:(0,n.BX)(a.Flex,{css:L,children:[""!==o&&l===c.JB?(0,n.tZ)(n.HY,{children:(0,n.tZ)(a.Box,{css:[I],onClick:e=>{e.stopPropagation(),u(s,"".concat(f,"/main"),l,x)},children:(0,n.tZ)(g.Z,{css:X,children:"Tesisi Ara"})})}):(0,n.tZ)(a.Box,{css:[I],onClick:e=>{e.stopPropagation(),d(s,v,x,"".concat(f,"/main"))},children:(0,n.tZ)(g.Z,{css:X,children:B.uk})})," ",(null==s?void 0:s.priceCount)>1&&w&&(0,n.tZ)(a.Box,{ref:k,css:[R,I],onClick:e=>{Z?(e.stopPropagation(),_(!1),h()):(_(!0),p(e,s,null==s?void 0:s.objectId,v))},children:(0,n.tZ)(z.Z,{fill:m.wL.white,size:15})})]})})}),j=t(12403);let O=(e,i)=>(0,o.iv)("background-color:",m.wL.white,";display:inline-flex;flex-direction:column;flex-shrink:0;position:relative;max-width:",e===j._.Vertical?"305px":"450px",";width:",e===j._.Vertical?"305px":"100%",";height:",e===j._.Vertical?"305px":"110px",";border-radius:4px;border:solid 1px ",m.wL.veryLightPink2,";padding:",e===j._.Vertical?"0":"5px",";&:not(:last-child){margin-right:",i?"0":"25px",";}",m._Q.tablet,"{width:",e===j._.Vertical?"220px":"450px",";height:",e===j._.Vertical?"245px":"110px",";&:not(:last-child){margin-right:",i?"0":"12px",";}}&:hover{text-decoration:none;color:",m.wL.blue3,";box-shadow:0 2px 10px 0 rgba(0,0,0,0.23);}cursor:pointer;"),H=(e,i)=>(0,o.iv)("position:relative;display:inline-flex;flex-direction:column;flex-shrink:0;width:",e===j._.Vertical?"100%":i?"120px":"160px",";height:",e===j._.Vertical?"170px":"98px",";flex-direction:row;",m._Q.tablet,"{height:",e===j._.Vertical?"111px":"98px",";}border-radius:",i?"4px":"0",";"),M=(e,i)=>(0,o.iv)("position:relative;display:inline-flex;flex-direction:column;flex-shrink:0;width:",e===j._.Vertical?"303px":i?"120px":"160px",";height:",e===j._.Vertical?"170px":"98px",";border-radius:",e===j._.Vertical?"4px 4px 0 0":"4px",';position:"relative";',m._Q.tablet,"{width:",e===j._.Vertical?"220px":i?"120px":"160px",";height:",e===j._.Vertical?"111px":"98px",";}"),Q=(0,o.iv)("position:relative;min-height:100%;"),A=e=>(0,o.iv)("padding:",e===j._.Vertical?"10px":"2px",";width:100%;position:relative;"),F=e=>(0,o.iv)("padding-left:",e===j._.Vertical?"0":"10px",";overflow:initial;",m._Q.tablet,"{height:80px;}"),N=e=>(0,o.iv)("white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:",e===j._.Vertical?"20px":"14.5px",";font-size:",e===j._.Vertical?"16px":"12px",";font-weight:600;padding:",e===j._.Vertical?"0":"0 0 3px",";",m._Q.tablet,"{font-size:",e===j._.Vertical?"13px":"12px",";}"),E=e=>(0,o.iv)("border-radius:5px;background-color:",m.wL.lightBlue4,";justify-content:space-between;padding:",e===j._.Vertical?"10px":" 5px",";"),J=(0,o.iv)("white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-lines:1;font-size:12px;font-weight:400;"),D=(0,o.iv)("width:30px;height:30px;background-color:#00000070;&:hover{background-color:",m.wL.transparentBlack2,";}"),q=e=>(0,o.iv)("border-radius:",e===j._.Vertical?"2px 2px 0 0":"4px",";");var T=(0,r.memo)(function(e){var i;let{facilityItem:t,position:l,providerMap:d,page:s,handleOpenPopover:h,handleClosePopover:v,handleOnPhoneCall:x,handleOnExit:w,providerWidget:b,cardType:Z,isCardsVertical:z,isNearBy:P}=e,L=(0,r.useRef)(null),I=(0,B.jU)()&&(0,y.R)(L),[R,X]=(0,r.useState)(!1),{facilityName:T,providerId:W,price:Y,phoneNumber:G}=(0,r.useMemo)(()=>{var e,i,l,n,r,o,a,d,c,s,p,h,u,v;return{facilityName:t.name,imageId:null===(i=t.images)||void 0===i?void 0:null===(e=i[0])||void 0===e?void 0:e.image,averageRating:t.avgRating,reviewCount:null===(l=t.interactions)||void 0===l?void 0:l.count,rating:parseFloat((null===(n=t.interactions)||void 0===n?void 0:n.rating)||"0"),price:(null!==(u=null==t?void 0:null===(o=t.deals)||void 0===o?void 0:null===(r=o.heroPrice)||void 0===r?void 0:r.discountPrice)&&void 0!==u?u:0)>0?null==t?void 0:null===(d=t.deals)||void 0===d?void 0:null===(a=d.heroPrice)||void 0===a?void 0:a.discountPrice:null!==(v=null==t?void 0:null===(s=t.deals)||void 0===s?void 0:null===(c=s.heroPrice)||void 0===c?void 0:c.rawPrice)&&void 0!==v?v:0,slug:t.slug,providerId:(null==t?void 0:null===(h=t.deals)||void 0===h?void 0:null===(p=h.heroPrice)||void 0===p?void 0:p.providerId)||0,phoneNumber:null==t?void 0:t.phoneNumber}},[t]);(0,r.useEffect)(()=>{I&&!R&&(X(!0),(0,u.AB)((0,u.eQ)([t],l,d,s,"".concat(b,"/main"))))},[L,I,B.jU,y.R]);let U=(0,r.useMemo)(()=>{var e;let i=[];return null===(e=t.images)||void 0===e||e.forEach((e,t)=>{i.push((0,n.tZ)(_.Gl,{src:"".concat(k.Ik,"75/303x170/").concat(e.image),alt:T,externalCss:M(Z,z),imageCss:q(Z)},t))}),i.slice(0,5)},[t]),K=()=>{if(P){window.location.href="/".concat(t.slug,"-fiyatlari/");return}""!==G&&W===c.JB?x(t,"".concat(b,"/main"),W,s):w(t,l,s,"".concat(b,"/main"))};return(0,n.tZ)(a.Box,{css:O(Z,z),title:String(T),ref:L,onClick:()=>K(),children:(0,n.BX)(a.Flex,{flexDirection:"".concat(Z===j._.Vertical?"column":"row"),children:[(0,n.tZ)(_.Zb,{externalCss:H(Z,z),children:(0,n.tZ)(a.Box,{css:(0,o.iv)("width:100%;"),children:(0,n.tZ)(p.Z,{arrowExternalCss:D,chevronColor:m.wL.white,isArrowHidden:!(U.length<2),isAbortClickOnHover:!0,children:U})})}),(0,n.tZ)(_.Zb,{width:"100%",css:F(Z),children:(0,n.tZ)(_.aY,{externalCss:A(Z),children:(0,n.BX)(a.Flex,{flexDirection:"column",css:Q,children:[(0,n.BX)(a.Flex,{minHeight:20,children:[(0,n.tZ)(C.Z,{count:(null==t?void 0:t.starCount)||0}),(null==t?void 0:null===(i=t.category)||void 0===i?void 0:i.name)&&(0,n.tZ)(g.Z,{fontSize:13,css:(0,o.iv)("line-height:20px;"),children:t.category.name})]}),(0,n.BX)(g.Z,{externalCss:N(Z),children:[" ",(0,f.h8)(null!=T?T:"",1,z?12:10,1.2,200,!1,!0)]}),(0,n.BX)(a.Flex,{alignItems:"center",children:[(0,n.tZ)(V.Z,{width:"12",height:"18",fill:m.wL.blue3,style:{padding:"0px 0px 3px"}}),(0,n.tZ)(g.Z,{css:J,children:(0,f.h8)((0,f.YZ)(t.locationTree),1,z?12:10,1.2,200,!1,!0)})]}),(0,n.tZ)(a.Flex,{css:[E(Z)],children:(0,n.tZ)(S,{position:l,phoneNumber:G,providerId:W,handleOnExit:w,handleOnPhoneCall:x,facilityItem:t,handleOpenPopover:h,handleClosePopover:v,objectId:t.objectId,page:s,providerWidget:b})})]})})})]})})}),W=t(4284);function Y(){let e=(0,l._)(["\n height: 1px;\n flex-grow: 1;\n background-color: ",";\n margin-right: 1px;\n "]);return Y=function(){return e},e}function G(){let e=(0,l._)(["\n margin-left: 5px;\n font-size: 12px;\n min-width: 65px;\n "]);return G=function(){return e},e}let U=(0,o.iv)("display:inline-flex;flex-shrink:0;margin-right:30px;"),K=(0,o.iv)("height:277px;width:100%;margin:0;"),$=(0,o.iv)("width:100%;"),ee=(0,o.iv)("justify-content:space-between;align-items:center;margin:9px 0;cursor:pointer;"),ei=(0,o.iv)("background-color:",m.wL.white,";border-radius:5px;padding:0 10px;position:relative;color:",m.wL.black,";z-index:10;line-height:13px;font-size:11px;"),et=(e,i,t)=>(0,o.iv)(ei," bottom:",t===j._.Vertical?"18px":"3px",";left:",e,"px;width:230px;",i&&"\n &:before {\n left: 78%;\n } \n &:after {\n left: 78%;\n }"),el=(0,o.iv)("align-items:center;font-size:12px;font-weight:400;line-height:13px;letter-spacing:0.5px;margin-right:3px;"),en=(0,o.iv)("position:absolute;"),er=(0,o.iv)("display:flex;flex-direction:column;gap:10px;"),eo=(0,o.iv)("margin-top:10px;"),ea=(e,i)=>(0,o.iv)(ei," color:",m.wL.black,";top:",e,"px;left:",i-221,"px;&:before{left:86%;}&:after{left:86%;}");var ed=(0,r.memo)(function(e){let{facilities:i,loading:t,providerMap:l,page:_,defaultParams:k,isNearBy:y,handleOnExit:C,handleOnPhoneCall:V,handleOnClickProvider:z,providerWidget:P,cardType:L=j._.Vertical,isCardsVertical:I=!1,facilityCount:R=3,location:X}=e,S=(0,r.useRef)(null),O=(0,r.useRef)(null);(0,b.H)(O,()=>eh(),[]);let H=(0,Z.i)(),{expandFacilityData:M,setExpandFacilityData:Q}=(0,r.useContext)(h.S),[A,F]=(0,r.useState)(null),[N,E]=(0,r.useState)(),[J,D]=(0,r.useState)(!1),[q,ei]=(0,r.useState)(0),[ed,ec]=(0,r.useState)(),es=(0,Z.i)().width<=m.Op;(0,r.useEffect)(()=>{!J&&N&&(0,u.AB)((0,u.jJ)("quickview_card",N,"kapat",y))},[J,N]);let ep=(0,r.useCallback)((e,i,t,l)=>{e.stopPropagation(),E(i),D(!0),ec(l),eu(t,l,i),(0,u.AB)((0,u.jJ)("quickview_card",i,"en-uygun-fiyat",y))},[A]),eh=(0,r.useCallback)(()=>{D(!1),F(null)},[N]),eu=(e,i,t)=>{if((0,w.cb)(M,e)){let n=(0,w.xJ)(M,e);n&&(F(n),(0,u.AB)((0,u.kb)({...n,...t},i,l,_,"".concat(P,"/prices"))))}else(0,c.GY)({fls:JSON.stringify({plim:1,poff:0,flsp:[{fid:9,v:e}]}),poolData:"",queryParams:JSON.stringify({cin:null==k?void 0:k.checkIn,cout:null==k?void 0:k.checkOut,act:null==k?void 0:k.adultCount,cas:null==k?void 0:k.childAges}),obj:e,src:"Unpaid"},!1).then(e=>null==e?void 0:e.body).then(e=>{F(e),(0,u.AB)((0,u.kb)({...e,...t},i,l,_,"".concat(P,"/prices"))),M.push(e),Q(M)})},ev=(0,r.useMemo)(()=>{var e,i,t;let{result:r,flatRight:d,cardWidth:c}=void 0===ed?{result:87,flatRight:!1,cardWidth:0}:w.Sq.horizontalCardShift(L,ed-q,es,H.width,I,ed,S);if(null==A?void 0:null===(e=A.prices)||void 0===e?void 0:e.providers)return(0,n.BX)(v.Z,{ref:O,externalCss:I?ea(r,c):et(r,d,L),children:[" ",null==A?void 0:null===(t=A.prices)||void 0===t?void 0:null===(i=t.providers)||void 0===i?void 0:i.map((e,i)=>{var t,r,d;return(0,n.BX)(a.Flex,{css:ee,onClick:()=>N&&z(N,e,null==e?void 0:e.prices[0],i,P,null!=_?_:""),children:[(0,n.BX)(a.Flex,{css:el,children:[l&&l[null==e?void 0:e.providerId]," "]})," ",(0,n.tZ)("span",{css:(0,o.iv)(Y(),m.wL.brownGrey2)})," ",(0,n.tZ)(x.Z,{height:15,width:15})," ",(0,n.BX)(g.Z,{css:(0,o.iv)(G()),children:[(0,f.ge)(Math.round(null!==(d=null==e?void 0:null===(t=e.prices[0])||void 0===t?void 0:t.discountPrice)&&void 0!==d?d:null==e?void 0:null===(r=e.prices[0])||void 0===r?void 0:r.rawPrice))," ","TL"]})]},null==e?void 0:e.providerId)})," "]})},[J,A,ep,q,ed,N]),ex=(0,r.useCallback)(()=>(0,n.tZ)(a.Flex,{children:[,,,,,].fill(0).map((e,i)=>(0,n.tZ)(d.Z,{width:"305px",height:"277px",css:U},i))}),[]),ef=(0,r.useMemo)(()=>{let e=[];return null==i||i.map((i,t)=>{t>R&&L!==j._.Vertical&&I||(2===t&&e.push((0,n.tZ)(s.default,{disable:!0,externalCss:K,id:"div-gpt-ad-1615282743887-0"},t+"_ad")),e.push((0,n.tZ)(T,{position:t,facilityItem:i,providerMap:l,page:_||"",defaultParams:k,handleOpenPopover:ep,handleClosePopover:eh,isNearBy:y,handleOnExit:C,handleOnPhoneCall:V,providerWidget:P,cardType:L,isCardsVertical:I},i.objectId+"_".concat(t))))}),e},[i]);return I&&L!==j._.Vertical?(0,n.BX)(a.Box,{children:[(0,n.tZ)(a.Box,{css:en,children:J&&ev}),(0,n.tZ)(a.Box,{css:er,ref:S,children:ef}),(0,n.tZ)(W.Z,{externalCss:eo,href:X?"/".concat((0,B.k6)(X.toLocaleLowerCase()),"-otelleri"):"/",title:"Daha fazla otel g\xf6r",children:"Daha fazla otel g\xf6r"})]}):(0,n.tZ)(a.Box,{css:$,children:t?ex():(0,n.BX)(a.Box,{children:[(0,n.tZ)(p.Z,{setParentIndex:ei,children:ef}),(0,n.tZ)(a.Box,{css:(0,o.iv)("position:absolute;"),children:J&&ev})]})})})},27734:function(e,i,t){var l=t(35944),n=t(34665),r=t(67294);i.Z=r.memo(function(e){return(0,l.tZ)("svg",{width:e.size||"16px",height:e.size||"16px",viewBox:"0 0 16 16",version:"1.1","aria-labelledby":"Aşağı Ok",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,l.tZ)("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:(0,l.tZ)("g",{transform:"translate(-702.000000, -274.000000)",children:(0,l.tZ)("g",{transform:"translate(625.000000, 272.000000)",children:(0,l.BX)("g",{transform:"translate(85.000000, 10.000000) rotate(-270.000000) translate(-85.000000, -10.000000) translate(77.000000, 2.000000)",children:[(0,l.tZ)("polygon",{id:"Path",points:"0 0 16 0 16 16 0 16"}),(0,l.tZ)("polygon",{id:"Path",fill:e.fill||n.wL.blue3,fillRule:"nonzero",points:"6.66666667 4 5.72666667 4.94 8.78 8 5.72666667 11.06 6.66666667 12 10.6666667 8"})]})})})})})})},46282:function(e,i,t){var l=t(35944),n=t(67294),r=t(34665);i.Z=n.memo(function(e){return(0,l.tZ)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",viewBox:"0 0 15 15",alt:"Lokasyon Pini","aria-labelledby":"Lokasyon Pini",...e,children:(0,l.BX)("g",{fill:"none",fillRule:"evenodd",children:[(0,l.tZ)("path",{d:"M0 0L15 0 15 15 0 15z",transform:"translate(-381 -1089) translate(259 1014) translate(122 75)"}),(0,l.tZ)("path",{fill:e.fill||r.wL.black,fillRule:"nonzero",d:"M7.5 1.25c-2.419 0-4.375 1.956-4.375 4.375 0 3.281 4.375 8.125 4.375 8.125s4.375-4.844 4.375-8.125c0-2.419-1.956-4.375-4.375-4.375zm0 5.938c-.862 0-1.563-.7-1.563-1.563 0-.862.7-1.563 1.563-1.563s1.563.7 1.563 1.563c0 .862-.7 1.563-1.563 1.563z",transform:"translate(-381 -1089) translate(259 1014) translate(122 75)"})]})})})},44594:function(e,i,t){var l=t(35944),n=t(67294),r=t(34665);i.Z=n.memo(function(e){return(0,l.tZ)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",viewBox:"0 0 15 15",...e,children:(0,l.BX)("g",{fill:"none",fillRule:"evenodd",children:[(0,l.tZ)("path",{d:"M0 0L15 0 15 15 0 15z",transform:"translate(-256 -1148) translate(0 994) translate(15 106) translate(241 48)"}),(0,l.tZ)("path",{fill:r.wL.blue3,fillRule:"nonzero",d:"M11.875 11.875h-8.75v-8.75H7.5v-1.25H3.125c-.694 0-1.25.563-1.25 1.25v8.75c0 .688.556 1.25 1.25 1.25h8.75c.688 0 1.25-.563 1.25-1.25V7.5h-1.25v4.375zm-3.125-10v1.25h2.244L4.85 9.269l.881.881 6.144-6.144V6.25h1.25V1.875H8.75z",transform:"translate(-256 -1148) translate(0 994) translate(15 106) translate(241 48)"})]})})})},12403:function(e,i,t){var l,n;t.d(i,{_:function(){return l}}),(n=l||(l={}))[n.Vertical=1]="Vertical",n[n.Horizontal=2]="Horizontal"}}]);