import{r as e,_ as t,j as o,h as c,I as r}from"./react-B_SyE9nW.js";import{g as i,a as s,s as a,f as n,c as l,e as h,o as m,j as d,G as p,S as g,P as u,B as v,w as x,m as f,n as j,x as C,N as z,aX as b}from"./index-Flm6m8Wj.js";import{a as M}from"./embla-carousel-react.esm-NewS-kch.js";import{_ as I}from"./history-CBi_mSPs.js";import{P as k,I as w,T as y}from"./index-C6Ujt1Uk.js";import{U as B,I as S}from"./ItemLoading-wir9MCjq.js";import{a as A}from"./Address-CoPTZTJZ.js";import{s as E}from"./BusinessReviewStore-DfTzlAZI.js";import{N as T}from"./NoFound-BgX2Vk3k.js";import{P as D}from"./PictureBox-DPAYvVY_.js";import{F as V,P as L,C as F,a as _}from"./PhotoUpIco-bSYKiGLb.js";import{B as H}from"./BusinessContext-CquxFcVa.js";import{E as $}from"./EnjBackdrop-C8mPud4I.js";import{B as P}from"./BackIco-CDsoigLi.js";import{I as R,a as N}from"./EditSuccessModal-B8mH-U4R.js";import{S as O}from"./Stack-CZ7Wid7r.js";function U(e){return i("MuiAppBar",e)}s("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const W=["className","color","enableColorOnDark","position"],G=(e,t)=>e?`${null==e?void 0:e.replace(")","")}, ${t})`:t,K=a(k,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,t[`position${n(o.position)}`],t[`color${n(o.color)}`]]}})((({theme:e,ownerState:t})=>{const o="light"===e.palette.mode?e.palette.grey[100]:e.palette.grey[900];return I({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},"fixed"===t.position&&{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},"absolute"===t.position&&{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},"sticky"===t.position&&{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},"static"===t.position&&{position:"static"},"relative"===t.position&&{position:"relative"},!e.vars&&I({},"default"===t.color&&{backgroundColor:o,color:e.palette.getContrastText(o)},t.color&&"default"!==t.color&&"inherit"!==t.color&&"transparent"!==t.color&&{backgroundColor:e.palette[t.color].main,color:e.palette[t.color].contrastText},"inherit"===t.color&&{color:"inherit"},"dark"===e.palette.mode&&!t.enableColorOnDark&&{backgroundColor:null,color:null},"transparent"===t.color&&I({backgroundColor:"transparent",color:"inherit"},"dark"===e.palette.mode&&{backgroundImage:"none"})),e.vars&&I({},"default"===t.color&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette.AppBar.defaultBg:G(e.vars.palette.AppBar.darkBg,e.vars.palette.AppBar.defaultBg),"--AppBar-color":t.enableColorOnDark?e.vars.palette.text.primary:G(e.vars.palette.AppBar.darkColor,e.vars.palette.text.primary)},t.color&&!t.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette[t.color].main:G(e.vars.palette.AppBar.darkBg,e.vars.palette[t.color].main),"--AppBar-color":t.enableColorOnDark?e.vars.palette[t.color].contrastText:G(e.vars.palette.AppBar.darkColor,e.vars.palette[t.color].contrastText)},{backgroundColor:"var(--AppBar-background)",color:"inherit"===t.color?"inherit":"var(--AppBar-color)"},"transparent"===t.color&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))})),q=e.forwardRef((function(e,r){const i=l({props:e,name:"MuiAppBar"}),{className:s,color:a="primary",enableColorOnDark:m=!1,position:d="fixed"}=i,p=t(i,W),g=I({},i,{color:a,position:d,enableColorOnDark:m}),u=(e=>{const{color:t,position:o,classes:c}=e,r={root:["root",`color${n(t)}`,`position${n(o)}`]};return h(r,U,c)})(g);return o.jsx(K,I({square:!0,component:"header",ownerState:g,elevation:4,className:c(u.root,s,"fixed"===d&&"mui-fixed"),ref:r},p))}));const X=m((function({children:e}){return o.jsx("div",{className:"embla__slide",children:e})})),J=a("div")`
  position: relative;
  overflow: hidden;
  height: 100%;

  .embla__container {
    display: flex;
  }
  .embla__slide {
    position: relative;
    flex: 0 0 100%;
    width: 105px;
  }
`,Q=a(J)`
  height: auto;

  & .embla__slide {
    padding: 0 2px;
  }
`,Y=a(q)`
  &.MuiPaper-root.MuiAppBar-root {
    border-radius: 28px;
    margin-bottom: 10px;

    .MuiTabs-root {
      min-height: 42px;

      .MuiTabs-flexContainer {
        justify-content: space-evenly;

        button.MuiButtonBase-root {
          min-height: 42px;
          padding: 6px 0;
          min-width: fit-content;
          font-size: 14px;

          .MuiTab-wrapper {
            width: fit-content;
          }
        }
      }

      .MuiTabs-indicator {
        background-color: ${d.white};
        height: 1.5px;
        bottom: 9px;
      }
    }
  }
`,Z=m((({children:t,active:c=0,onChange:r,jump:i,draggable:s})=>{const[a,n]=M({loop:!1,dragFree:!1,align:"start",speed:25,draggable:s}),l=e.useRef(0);return e.useEffect((()=>{null==n||n.on("select",(()=>{const e=n.selectedScrollSnap();e!==l.current&&(l.current=e,null==r||r(e))}))}),[n]),e.useEffect((()=>{c!==(null==n?void 0:n.selectedScrollSnap())&&(null==n||n.scrollTo(c,i))}),[c,n]),o.jsx(Q,{ref:a,children:o.jsx("div",{className:"embla__container",children:t})})}));const ee=m((function({tabs:t,tabItems:c,defaultTab:r=0,showReviewsFunc:i,showMapFunc:s,jump:a,draggable:n}){const[l,h]=e.useState(-1),[m,d]=e.useState(!0),g=e.useContext(B),u=e=>{h(e?1:2)},v=()=>{h(0)};return e.useEffect((()=>{h(r)}),[g.getProfile.username]),e.useEffect((()=>{let e;return p.isDesktop||1!==r||m&&a||(e=setTimeout((()=>{if(!p.isDesktop){const e=document.getElementById("enj-tab-panel");E(e,{behavior:"smooth",block:"start"},{duration:600})}}),2e3)),()=>clearTimeout(e)}),[]),e.useEffect((()=>{i&&(i.current=u),s&&(s.current=v);const e=setTimeout((()=>{h(r),d(!1)}),1500);return()=>clearTimeout(e)}),[]),o.jsx(o.Fragment,{children:-1===l?o.jsx(o.Fragment,{}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"collections-padding",id:"enj-tab-panel",children:o.jsx(Y,{position:"static",elevation:0,children:o.jsx(A,{value:l,onChange:(e,t)=>{if(h(t),p.isDesktop){if(1===t){const e=document.getElementById("enj-button-delivery-container");E(e,{behavior:"smooth",block:"start"},{duration:600})}}else{const e=document.getElementById("enj-tab-panel");E(e,{behavior:"smooth",block:"start"},{duration:600})}},indicatorColor:"secondary",textColor:"inherit",children:t})})}),o.jsx(Z,{active:Number(l),onChange:h,jump:a&&m,draggable:n&&1!==l,children:c})]})})}));function te(e){return o.jsx(g,{...e,children:o.jsx("path",{d:"M24 2.8v18.4c0 1.5-1.3 2.8-2.8 2.8H2.8A2.9 2.9 0 0 1 0 21.2V2.8C0 1.3 1.3 0 2.8 0h18.4C22.7 0 24 1.3 24 2.8z"})})}function oe(e){return o.jsx(g,{...e,children:o.jsx("path",{d:"M21.2 24H2.8A2.9 2.9 0 0 1 0 21.2V2.8C0 1.3 1.3 0 2.8 0h18.4C22.7 0 24 1.3 24 2.8v18.4c0 1.5-1.3 2.8-2.8 2.8zM2.8 1.4c-.8 0-1.4.6-1.4 1.4v18.4c0 .8.6 1.4 1.4 1.4h18.4c.8 0 1.4-.6 1.4-1.4V2.8c0-.8-.6-1.4-1.4-1.4H2.8z"})})}function ce(e){return o.jsx(g,{...e,children:o.jsx("path",{d:"M10.9 2.8v5.4c0 1.6-1.3 2.8-2.8 2.8H2.8C1.2 11 0 9.8 0 8.2V2.8C0 1.3 1.2 0 2.8 0h5.3c1.5 0 2.8 1.3 2.8 2.8zM10.9 15.8v5.4c0 1.5-1.3 2.8-2.8 2.8H2.8C1.2 24 0 22.7 0 21.2v-5.4C0 14.2 1.2 13 2.8 13h5.3c1.5 0 2.8 1.2 2.8 2.8zM24 2.8v5.4c0 1.6-1.3 2.8-2.8 2.8h-5.3c-1.5 0-2.8-1.3-2.8-2.8V2.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.4-.9-.9-.9h-1zm-5.2 10.1h-1a2 2 0 0 1-1.9-1.9v-1.1c0-1.1.8-1.9 1.9-1.9h1c1 0 1.9.9 1.9 1.9v1.1c-.1 1-.9 1.9-1.9 1.9zm-1.1-3.9c-.5 0-.9.4-.9.9v1.1c0 .5.4.9.9.9h1c.5 0 .9-.4.9-.9v-1.1c0-.5-.4-.9-.9-.9h-1zm7.3 3.9h-1a2 2 0 0 1-1.9-1.9v-1.1c0-1.1.8-1.9 1.9-1.9h1c1 0 1.9.9 1.9 1.9v1.1c0 1-.8 1.9-1.9 1.9zm-1-3.9c-.5 0-.9.4-.9.9v1.1c0 .5.4.9.9.9h1c.5 0 .9-.4.9-.9v-1.1c0-.5-.4-.9-.9-.9h-1z"})})}const le={bgcolor:d.white,display:"flex",alignItems:"flex-start","& .enj-backdrop-close-btn":{background:d.black50},"& > .MuiGrid-root":{height:"100%"}};const he=m((function({open:t,title:c,headerBody:r=o.jsx(o.Fragment,{}),body:i=o.jsx(o.Fragment,{}),showIframe:s=!1,onClose:a}){const n=p.height,l=e.useRef(!1);return e.useEffect((()=>{s||!t||l.current||u(!0),t||(l.current=!1)}),[s,t]),o.jsxs($,{open:t,sx:le,children:[o.jsxs(v,{sx:{height:"90px",borderBottom:`1px solid ${d.whiteBorder}`,borderRadius:"0 0 16px 16px",display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column"},children:[o.jsxs(v,{sx:{width:"100%",display:"flex",flexDirection:"row",position:"relative"},children:[o.jsx(w,{sx:{position:"absolute",top:"-8px","& .MuiSvgIcon-root":{color:d.black}},onClick:()=>{x(),null==a||a()},children:o.jsx(P,{})}),o.jsx(y,{text:c})]}),r]}),o.jsx(v,{sx:{position:"relative",height:`calc(${n}px - 90px)`},children:i})]})}));const me=m((function(){const t=e.useContext(H),{onCloseMoreImg:c,onClickLikeImageBusiness:r,getImagesMenuStr:i}=t;return i.getSize?o.jsx(R.Provider,{value:{isCarta:!0,name:t.getBusiness.name},children:o.jsx(N,{open:f.isImageDetailUser,images:i.getElements,onClickLikeImage:r,onCloseImageDetail:c,defaultImage:t.getSelectedImage,totalElements:i.getCount,onCallNextItem:e=>{!i.isLoading&&i.hasMore&&e>=i.offset&&i.loadData()}})}):o.jsx(o.Fragment,{})})),de=a("div")`
  display: grid;
  grid-template-columns: repeat(var(--img-columns), 1fr);
  column-gap: 5px;
  row-gap: 8px;
  padding-left: 20px;
  padding-right: 20px;
`,pe=a("div")`
  align-self: center;
  justify-self: center;
  width: var(--img-w);
  height: var(--img-h);
  display: flex;
  position: relative;
  justify-content: center;
  align-items: center;
  padding: 0;

  &:first-of-type {
    width: var(--img-w);
    height: var(--img-h);
    border: 1px solid var(--itm-color);
    border-radius: 15px;
    overflow: hidden;

    & .MuiBox-root {
      width: inherit;
      height: inherit;

      & label {
        width: inherit;
        height: inherit;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;

        & span {
          margin-top: 5px;
        }
      }
    }
  }
`,ge={MOBILE:375,TABLET:608,DESKTOP:720},ue=(e,t=window.innerWidth)=>{const o=ge[p.device],c=((t>o?o:t)-(40+5*(e-1)))/e;return{width:c,height:c/(1===e?4/3:1)}};const ve=m((function(){const t=e.useContext(H),c=e.useMemo((()=>ge[p.device]),[p.device]),{getMenuStore:i,onClickAccept:s,onImageClick:a,onCloseWebMenu:n,getImagesMenuStr:l}=t,{onHandleUploadClick:h}=i,m=e.useCallback((()=>l.loadData()),[]),g=parseInt("10"),u=e=>{f.setPrevious(f.current),i.setBusinessSlug(t.getSlug),h(e,g)};e.useLayoutEffect((()=>i.clear),[]);const[x,b]=e.useState(p.isMobile?3:2),{width:M,height:I}=e.useMemo((()=>ue(x)),[p.width,x]),k=e.useMemo((()=>{const{main_type_str:e,city:o,name:c}=t.getBusiness;return j("alt.business.menu.popper",{business_type:e,city:o,business_name:c})}),[t.getBusiness,C.language]);e.useEffect((()=>{switch(p.device){case"MOBILE":4===x&&b(3);break;case"TABLET":1!==x&&4!==x||b(3);break;case"DESKTOP":1!==x&&3!==x||b(4)}}),[p.width]);const y=e.useMemo((()=>i.getImgsToCrop.find((e=>e.id===i.getCurrentCropImage))),[i.getImgsToCrop,i.getCurrentCropImage]);return o.jsx(he,{onClose:n,open:t.isWebMenu,title:j("menu1"),iframeUrl:t.getCartaUrl,showIframe:t.getWebPict,body:o.jsxs(o.Fragment,{children:[o.jsxs(v,{sx:{textAlign:"center",py:"10px"},children:[p.isDesktop?o.jsx(w,{onClick:()=>b(4),children:4===x?o.jsx(ae,{}):o.jsx(ne,{})}):o.jsx(o.Fragment,{}),p.isDesktop?o.jsx(o.Fragment,{}):o.jsx(w,{onClick:()=>b(3),children:3===x?o.jsx(ie,{}):o.jsx(se,{})}),o.jsx(w,{onClick:()=>b(2),children:2===x?o.jsx(ce,{}):o.jsx(re,{})}),p.isMobile?o.jsx(w,{onClick:()=>b(1),children:1===x?o.jsx(te,{}):o.jsx(oe,{})}):o.jsx(o.Fragment,{})]}),o.jsx(r,{style:{height:"calc(100% - 60px)",width:"100%",maxWidth:`${Number(c)}px`,margin:"auto","--img-columns":String(x),"--img-w":`${M}px`,"--img-h":`${I}px`,"--itm-color":d.red,background:d.white},endReached:m,overscan:1.25*p.height,itemContent:e=>{var t;return 0===e?o.jsx(v,{sx:{"&.MuiBox-root":{background:d.white,display:"flex",justifyContent:"center",alignItems:"center"}},children:o.jsxs(V,{onChange:u,multiple:!0,children:[o.jsx(L,{sx:{color:d.red,width:"28px",height:"28px"}}),p.isMobile&&3===x?o.jsx(o.Fragment,{}):o.jsx(z,{color:"red",margin:"0 0 0 5px",children:j("addMenu")})]})}):o.jsx(D,{width:M,height:I,onClick:()=>a(l.getElements[e-1].uuid),radius:"15px",src:null==(t=l.getElements[e-1])?void 0:t.image,alt:k,sx:{cursor:"pointer"}})},rangeChanged:l.hasMore?({endIndex:e})=>{e>=l.offset&&!l.isLoading&&l.loadData()}:void 0,components:{Item:pe,List:de,ScrollSeekPlaceholder:l.hasMore&&l.isLoading?()=>o.jsx(v,{sx:{width:`${M}px`,height:`${I}px`},children:o.jsx(S,{})}):void 0},totalCount:l.getSize+1}),o.jsx(F,{onClickAccept:()=>s(g),src:y,extension:i.getExtension,aspectRatio:_.VERTICAL,images:i.getImgsToCrop,onDelete:i.deleteImageFromCrops,onChange:i.setCurrentCropImage,imageToEdit:i.getCurrentCropImage,onCropImage:i.onHandleCropImage,limit:g,onClose:i.onHandleDeleteAllImages}),o.jsx(me,{})]})})}));const xe=m((function(){const t=e.useContext(B),{onCloseMoreImg:c,onClickLikeImageUser:r}=t,i=e.useMemo((()=>t.getImagesLength-b),[t.getImagesLength]);return t.getUserGallery.length?o.jsx(N,{open:f.isImageDetailGallery,images:t.getUserGallery,onClickLikeImage:r,onCloseImageDetail:c,defaultImage:t.getSelectedImage,onCallNextItem:e=>{!t.isLoading&&t.hasMore&&e>=i&&t.loadUserImages()},totalElements:t.getTotalElements}):o.jsx(o.Fragment,{})})),fe=a("div")`
  display: grid;
  grid-template-columns: repeat(var(--img-columns), 1fr);
  gap: 8px;
  padding-left: 0;
  padding-right: 0;
  @media (min-width: 768px) {
    gap: 16px;
  }
`,je=a("div")`
  align-self: center;
  justify-self: center;
  width: 100%;
  height: var(--img-h);
  display: flex;
  position: relative;
  justify-content: center;
  align-items: center;
  padding: 0;

  & > .MuiBox-root {
    width: inherit;
    height: inherit;

    min-width: unset;
    min-height: unset;

    & img {
      min-width: 100%;
    }
  }
`;function Ce(e){if(!e)return"";const{business:t={},product:o={}}=e,c=!!o,{main_type_str:r="",name:i="",city:s=""}=t||{};return j(c?"alt.product.review":"alt.business.review",{business_type:r,city:s,business_name:i,[c?"product_name":"cuisine_type"]:c?null==o?void 0:o.name:t.cuisines})}const ze=m((function(){const t=e.useContext(B),c=e.useMemo((()=>ge[p.device]),[p.device]),i=e.useMemo((()=>t.getImagesLength-b),[t.getImagesLength]),s=e.useMemo((()=>~~((p.height-258)/86+10)),[p.height]),a=e.useCallback((()=>t.loadUserImages()),[]),[n,l]=e.useState(p.isMobile?3:4),{width:h,height:m}=e.useMemo((()=>{const{height:e,width:t}=ue(n);return{width:t,height:p.isMobile||2!==n?e:e*(3/4)}}),[p.width,n]);return e.useEffect((()=>{let e;return t.getImagesLength<s&&(e=setTimeout((()=>{t.isLoading||t.loadUserImages()}))),()=>clearTimeout(e)}),[t.getImagesLength]),e.useEffect((()=>{switch(p.device){case"MOBILE":4===n&&l(3);break;case"TABLET":1!==n&&4!==n||l(3);break;case"DESKTOP":1!==n&&3!==n||l(4)}}),[p.width]),t.getImagesLength||t.isLoading?o.jsxs(v,{children:[o.jsxs(v,{sx:{textAlign:"center","@media(min-width:768px)":{mb:"20px",mt:"10px"}},children:[p.isDesktop?o.jsx(w,{onClick:()=>l(4),children:4===n?o.jsx(ae,{}):o.jsx(ne,{})}):o.jsx(o.Fragment,{}),p.isDesktop?o.jsx(o.Fragment,{}):o.jsx(w,{onClick:()=>l(3),children:3===n?o.jsx(ie,{}):o.jsx(se,{})}),o.jsx(w,{onClick:()=>l(2),children:2===n?o.jsx(ce,{}):o.jsx(re,{})}),p.isMobile?o.jsx(w,{onClick:()=>l(1),children:1===n?o.jsx(te,{}):o.jsx(oe,{})}):o.jsx(o.Fragment,{})]}),o.jsx(r,{style:{height:p.height-258+"px",width:"100%",maxWidth:`${Number(c)}px`,margin:"auto","--img-columns":String(n),"--img-w":`${h}px`,"--img-h":`${m}px`},endReached:a,overscan:1.25*p.height,itemContent:e=>{const c=t.getImages[e],{uuid:r="",image:i=""}=c||{},s=Ce(c);return o.jsx(D,{width:h,height:m,onClick:()=>t.onImageClick(r),radius:"20px",src:i,alt:s,sx:{cursor:"pointer"}})},rangeChanged:t.hasMore?({endIndex:e})=>{e>=i&&!t.isLoading&&t.loadUserImages()}:void 0,components:{Item:je,List:fe,ScrollSeekPlaceholder:t.hasMore&&t.isLoading?()=>o.jsx(v,{sx:{width:`${h}px`,height:`${m}px`},children:o.jsx(S,{})}):void 0},totalCount:t.getImages.length}),o.jsx(xe,{})]}):o.jsxs(O,{alignItems:"center",justifyContent:"center",children:[o.jsx(z,{size:"mini",maxWidth:"280px",margin:"15px auto 20px",children:j("noGalleryResult")}),o.jsx(T,{height:"180px"})]})}));export{ee as E,ze as G,he as I,ve as W,X as a,ue as c,Ce as g,ge as m};