1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4246],{21473:(e,s,l)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/profile/my-exhibitors",function(){return l(31980)}])},29527:(e,s,l)=>{"use strict";l.d(s,{A:()=>i});var t=l(6029),a=l(42947);let i=e=>(0,t.jsx)(a.A,{...e,withTicketing:!0})},31980:(e,s,l)=>{"use strict";l.r(s),l.d(s,{default:()=>f});var t=l(6029),a=l(73492),i=l(39794),n=l(96930),r=l(29527),c=l(40334),d=l(48629),o=l(81278),x=l(55729);let u=function(e){let{panels:s,activePanel:l,onSetActivePanel:a}=e;return(0,t.jsx)("div",{className:"flex px-2 pt-6 xl:px-6",children:s.map(e=>(0,t.jsx)("div",{className:(0,i.cn)("flex grow cursor-pointer flex-col items-center px-2 py-2",{"border-b-2 border-blue-500":l===e.key,"border-gray-400":l!==e.key}),onClick:()=>a(e.key),onKeyDown:()=>a(e.key),role:"button",tabIndex:0,children:(0,t.jsx)("p",{className:(0,i.cn)("font-bold",{"text-blue-500":l===e.key,"text-gray-400":l!==e.key}),children:e.label})},e.key))})};var h=l(4516);let p=[{key:"scanned",label:"Scann\xe9s"},{key:"favorite",label:"Favoris"}],f=function(){let[e,s]=(0,x.useState)("scanned"),{data:l,isLoading:c,refetch:d}=(0,a.Kto)({isScanned:!0,minimal:!0}),{data:f,isLoading:j,refetch:b}=(0,a.Kto)({isLiked:!0,minimal:!0}),[v,y]=(0,x.useState)(!1),[w,k]=(0,x.useState)(),{mutate:N}=(0,a.xd2)(),C=(0,i.al)(),_=(0,o.useRouter)(),A=(0,x.useCallback)((e,s)=>{N({structureId:e,like:!s},{onSuccess:()=>{d(),b()}})},[N,d,b]),D=e=>{k(e),y(!0)};return c||j?(0,t.jsx)(n.R,{}):(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:"bg-white xl:p-20",children:[C?(0,t.jsx)("div",{className:"h-[40px] bg-primary-500 ",children:(0,t.jsxs)("div",{className:"flex w-full items-center justify-between px-[14px] py-2 text-white",children:[(0,t.jsx)("button",{className:"",onClick:()=>{_.back()},children:(0,t.jsx)(h.eC,{width:24,height:24,fill:"white"})}),(0,t.jsx)("p",{className:"flex w-full justify-center",children:"Mes exposants"})]})}):(0,t.jsx)("h1",{className:"text-3xl font-extrabold",children:"Mes exposants"}),(0,t.jsx)(u,{panels:p,activePanel:e,onSetActivePanel:s}),(0,t.jsx)("div",{className:(0,i.cn)(C?"flex max-h-screen w-full px-3 py-4":"h-[456px] gap-12 rounded-3xl border bg-gray-50 px-8 py-6"),children:"scanned"===e?(0,t.jsx)(m,{structures:null!=l?l:[],onLike:A,openDialog:D}):(0,t.jsx)(g,{structures:null!=f?f:[],onLike:A,openDialog:D})}),w&&(0,t.jsx)(r.A,{exhibitorId:w,isOpen:v,onClose:()=>y(!1)})]})})};function m(e){let{structures:s,onLike:l,openDialog:a}=e;return 0===s.length?(0,t.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,t.jsx)("p",{className:"text-base text-gray-500",children:"Aucun exposants scann\xe9s"})}):(0,t.jsx)("div",{className:"grid w-full gap-4 overflow-auto xl:grid-cols-2",children:s.map(e=>{var s,i,n;return(0,t.jsxs)("div",{onClick:()=>a(e.id),onKeyDown:s=>{var l;return l=e.id,void(("Enter"===s.key||" "===s.key)&&(s.preventDefault(),a(l)))},role:"button",tabIndex:0,className:"flex w-full cursor-pointer items-center gap-3 rounded-lg border bg-white px-4 py-2 shadow-sm",children:[(0,t.jsx)("img",{src:e.picture?(0,c.w8)(null==(s=e.picture)?void 0:s.key,"media"):"/images/svg/anonymous_avatar.svg",alt:"Avatar",className:"size-10 rounded-full"}),(0,t.jsxs)("div",{className:"flex w-full flex-col",children:[(0,t.jsx)("p",{className:"font-semibold text-gray-800",children:e.businessName}),(0,t.jsx)("p",{className:"text-gray-500",children:null==(i=e.businessSectorRelation)?void 0:i.name})]}),(0,t.jsxs)("div",{className:"flex flex-col justify-end",children:[(0,t.jsx)("p",{className:"rounded-full bg-blue-50 px-2 text-blue-600",children:(null==(n=e.scan)?void 0:n.createdAt)?(0,d.GP)(new Date(e.scan.createdAt),"dd/MM/yyyy"):null}),(0,t.jsx)("button",{className:"flex w-full justify-end",onClick:s=>{s.stopPropagation(),l(e.id,e.isLiked)},children:e.isLiked?(0,t.jsx)(h.zw,{width:24,height:24,fill:"#DC6803"}):(0,t.jsx)(h.C3,{width:24,height:24,fill:"#98A2B3"})})]})]},e.id)})})}function g(e){let{structures:s,onLike:l,openDialog:a}=e;return 0===s.length?(0,t.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,t.jsx)("p",{className:"text-base text-gray-500",children:"Aucun exp
1osant favoris"})}):(0,t.jsx)("div",{className:"grid w-full gap-4 overflow-auto xl:grid-cols-2 ",children:s.map(e=>{var s;return(0,t.jsxs)("div",{role:"button",tabIndex:0,className:"flex cursor-pointer items-center gap-3 rounded-lg border bg-white px-4 py-2 shadow-sm",onClick:()=>a(e.id),onKeyDown:s=>{var l;return l=e.id,void(("Enter"===s.key||" "===s.key)&&(s.preventDefault(),a(l)))},children:[(0,t.jsx)("img",{src:e.picture?(0,c.w8)(null==(s=e.picture)?void 0:s.key,"media"):"/images/svg/anonymous_avatar.svg",alt:"Avatar",className:"size-10 rounded-full object-cover"}),(0,t.jsx)("div",{className:"flex grow flex-col text-start",children:(0,t.jsx)("p",{className:"font-semibold text-gray-800",children:e.businessName})}),(0,t.jsx)("button",{onClick:s=>{s.stopPropagation(),l(e.id,e.isLiked)},children:(0,t.jsx)(h.zw,{width:24,height:24,fill:"#DC6803"})})]},e.id)})})}}},e=>{e.O(0,[8807,2651,3076,4687,4028,2947,636,6593,8792],()=>e(e.s=21473)),_N_E=e.O()}]); 2//# sourceMappingURL=my-exhibitors-51751ff4e669348f.js.map
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.