1import{j as e}from"./vendor-query-DXAbHt1b.js";import{u as h,M as P}from"./useDeliveryTimeTypeText-DgOpGflF.js";import{S as D,t as v,e as H}from"./MarketCard-ni4ew8Go.js";import"./Separator-DUMc3PmS.js";import"./vendor-map-DXuqOiHK.js";import{B as E,v as y,I as m,X as g,p as N,z as C,x as w,a8 as I,A as x,y as R,a9 as _,aa as z}from"./index-BxM0UvRw.js";import{u as A}from"./useMarketWithBranchDetailQuery-BP43jWCT.js";import{D as c}from"./Divider-8KjZuCCv.js";import{H as M}from"./Header-BYyyZHQI.js";import{S as F}from"./ShadowHeader-BeeeCTK5.js";import{u as O}from"./useIPMarketBranchesListQuery-DNHFMkUw.js";import{S as Y}from"./Score-BGI50PG_.js";import{P as j}from"./Price-Cs9x_ogd.js";import"./MarketLogo-CaYORx47.js";import"./ImageView-DkBn-7Gq.js";import"./runtime-CrhUfq8u.js";import"./useBoolean-0IyEC_YV.js";import"./Icon-DNj_o5JR.js";import"./Skeleton-BucTEhhP.js";import"./index-m5kzysx6.js";import"./vendor-state-bZ_QQ8nY.js";import"./market-DK-VH75r.js";import"./index-BphNz8qE.js";import"./hooks-CKjeYQr2.js";import"./TenantGate-D5XcRzFb.js";import"./TenantSlot-Cv2pU8eN.js";import"./BoxIcon-BREv8U8X.js";import"./HistoryTwoIcon-CqeyYrVy.js";import"./ShopIcon-CvrxODx_.js";import"./ShopIcon-BXi0VGAM.js";import"./ewano-CR6B6G14.js";import"./ScoreV2-ClgU09ZU.js";import"./ColoredStar-Cj4QBH7H.js";import"./StarIcon-C43idpNe.js";import"./vendor-radix-C8AIeoqK.js";import"./index-B2qgZtu5.js";import"./AltArrowRightIcon-CGTmhUUv.js";import"./useScrollPastSentinel-B4v15qQr.js";import"./react-intersection-observer.m-BqmKQFL0.js";import"./useAddressManager-BITFFxK3.js";import"./addressSelection-D-YQIh6A.js";import"./utils-9nCQG6yz.js";import"./geoLocation-TIWL0gzn.js";import"./usePostSettingsQueriesEnabled-CiHNCE4K.js";import"./useAddressQueryDeps-YGxyfDWo.js";const p=r=>{let{buyType:t,withLabel:s}=r;const o=H(t);return e.jsxs(D,{buyType:t,version:1,children:[e.jsx(o,{className:"size-[18px]"}),s&&e.jsx("p",{className:"label-3",children:v.fa[t]})]})},i=r=>{let{title:t,leftComponent:s}=r;return e.jsxs("div",{className:"flex flex-row items-center w-full",children:[e.jsx("p",{className:"body-3 text-inverse-surface",children:t}),s]})},b=r=>{let{onClickShowCommentsHandler:t}=r;return e.jsx("div",{className:"flex flex-row gap-3 justify-end",children:e.jsx(E,{size:"sm",variant:"text",onClick:t,children:"Ù
Ø´Ø§ÙØ¯Ù ÙØ¸Ø±Ø§Øª"})})},T=r=>{let{rate:t,buyType:s}=r;return e.jsxs("div",{className:"flex flex-row items-center p-3 gap-2.5",children:[e.jsx(p,{buyType:s}),e.jsx("p",{className:"title-3 text-on-surface",children:v.fa[s]}),!!t&&e.jsx(Y,{rate:t,classes:"mr-auto"})]})},k=r=>{var l,d;let{market:t}=r;const s=y(),o=h(),{data:a}=O(t==null?void 0:t.uid),n=()=>{var f,u;if(!((u=(f=a==null?void 0:a.pages)==null?void 0:f[0])!=null&&u.items))return;const B=g(N.market.details.comments.root,{fromEnd:1}),S=C({[w]:m,[I]:a.pages[0].items[0].key}).toString();s({pathname:B,search:S})};return e.jsxs("div",{className:"flex flex-col w-full bg-surface",children:[e.jsx(T,{buyType:m,rate:t.inPersonRateAverage??null}),e.jsxs("div",{className:"flex flex-col p-3 gap-3",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(i,{title:"تعداد شعبÙ:",leftComponent:e.jsx("p",{className:"body-3 text-inverse-surface mr-auto",children:(d=(l=a==null?void 0:a.pages)==null?void 0:l[0])==null?void 0:d.totalCount})}),e.jsx(i,{title:"ساعت Ú©Ø§Ø±Û Ø§Ù
Ø±ÙØ²:",leftComponent:e.jsx("p",{className:"body-3 text-inverse-surface mr-auto",children:o})})]}),e.jsx(b,{onClickShowCommentsHandler:n})]})]})},K=r=>{let{branch:t}=r;const s=y(),o=h(),a=()=>{R("event/click/market_comments");const n=g(N.market.details.comments.root,{fromEnd:1}),l=C({[w]:x}).toString();s({pathname:n,search:l})};return e.jsxs("div",{className:"flex flex-col w-full bg-surface",children:[e.jsx(T,{buyType:x,rate:(t==null?void 0:t.surveyAverageRate)??null}),e.jsxs("div",{className:"flex flex-col p-3 gap-3",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(i,{title:"ØØ¯Ø§Ù٠سبد Ø®Ø±ÛØ¯:",leftComponent:e.jsx(j,{value:(t==null?void 0:t.minimumPurchase)||0,unitClass:"size-[18px] !text-on-surface-variant",textClass:"body-3 !mr-auto text-inverse-surface"})}),e.jsx(i,{title:"Ù
دت زÙ
ا٠ارساÙ:",leftComponent:e.jsx("p",{className:"body-3 text-inverse-surface mr-auto",children:o})}),e.jsx(i,{title:"ÙØ²ÛÙ٠ارساÙ:",leftComponent:e.jsx(j,{value:(t==null?void 0:t.deliveryCost)||0,unitClass:"size-[18px] !text-on-surface-variant",textClass:"body-3 !mr-auto text-inverse-surface",shouldShowIsFree:!0})})]}),e.jsx(b,{onClickShowCommentsHandler:a})]})]})},_e=()=>{var o;const t=_()[z],{data:s}=A(t);return e.jsxs("div",{className:"flex flex-col grow bg-surface",children:[e.jsx(F,{children:e.jsx(M,{title:"Ù
شخصات ÙØ±ÙشگاÙ",classes:"shadow-none"})}),e.jsx("div",{className:"flex flex-col grow bg-surface w-full",children:e.jsxs("div",{className:"flex flex-col grow overflow-y-auto pb-safe-offset-4",children:[e.jsx("div",{className:"p-3",children:e.jsx(P,{leftComponent:e.jsxs("div",{className:"flex flex-row gap-2 self
1-start",children:[(s==null?void 0:s.inPerson)&&e.jsx(p,{buyType:m}),((s==null?void 0:s.online)||(s==null?void 0:s.external))&&e.jsx(p,{buyType:x})]}),subtitleComponent:e.jsx("p",{className:"body-3 text-primary",children:(o=s==null?void 0:s.selectedBranch)==null?void 0:o.subtitle}),titleClass:"title-3"})}),e.jsx(c,{}),(s==null?void 0:s.online)&&e.jsxs(e.Fragment,{children:[e.jsx(K,{branch:s.selectedBranch}),e.jsx(c,{})]}),(s==null?void 0:s.inPerson)&&e.jsxs(e.Fragment,{children:[e.jsx(k,{market:s}),e.jsx(c,{})]})]})})]})};export{_e as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.