var A=Object.defineProperty,D=Object.defineProperties;var H=Object.getOwnPropertyDescriptors;var w=Object.getOwnPropertySymbols;var M=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;var k=(o,e,r)=>e in o?A(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,s=(o,e)=>{for(var r in e||(e={}))M.call(e,r)&&k(o,r,e[r]);if(w)for(var r of w(e))E.call(e,r)&&k(o,r,e[r]);return o},f=(o,e)=>D(o,H(e));import{Box as u,Flex as y}from"@chakra-ui/react";import p from"@emotion/styled";var b=p(u)``,B=p(u)`
  display: flex;
  align-items: center;
  flex: 1 0 auto;
  padding: 0.5rem 0;
`,R=p(u)``,m=p(y)`
  display: flex;
  align-items: center;
  flex: 1 0 auto;
  padding: 0.5rem 0;

  -ms-overflow-style: none; /* Internet Explorer 10+ */
  scrollbar-width: none; /* Firefox */

  &::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
  }
`,C=p(y)`
  padding-right: 1rem;
`,T=p(y)`
  padding-right: 1rem;

  &:last-child {
    padding-right: 0;
  }
`,j=p(y)`
  min-height: 20vh;
  width: 100%;
  align-items: center;
  justify-content: center;
  flex-direction: column;
`;import{Box as F,Skeleton as L,Text as S,useMediaQuery as Q}from"@chakra-ui/react";import{Fragment as _,jsx as t,jsxs as c}from"react/jsx-runtime";var X=({data:o,columns:e,isLoading:r=!1,itemsPerPage:I,emptyState:z={title:"No Mints Found!",subtitle:"We'll replenish soon. Check back later."}})=>{let[h]=Q("(max-width: 768px)",{ssr:!1}),{title:N,subtitle:W}=z;return c(b,{children:[!h&&t(B,{children:e.map(({title:l,textAlign:g,sx:n},i)=>t(C,f(s({},n),{fontSize:"xs",fontWeight:"medium",justify:g==="right"&&"flex-end",color:"mutedForeground",children:l}),l+i))}),t(_,{children:(()=>{if(r){let l=h?[e[0],e[e.length-1]]:e;return Array.from(Array(I).keys()).map((g,n)=>t(m,{borderBottom:"1px",borderColor:"muted",children:l.map(({render:i,sx:x,textAlign:d},a)=>t(T,f(s({},x),{width:h?"50%":"100%",justify:d==="right"&&"flex-end",children:t(L,{speed:.6,height:8,width:h?"80%":"60%",startColor:"muted",endColor:"primary",opacity:.1,sx:{borderRadius:"md"}})}),a+a))},n))}else return c(R,{children:[o.map((l,g)=>{if(h){let n=e.slice(1,e.length-1);return c(F,{children:[t(m,{children:[e[0],e[e.length-1]].map(({render:i,sx:x,textAlign:d},a)=>t(T,f(s({},x),{width:"50%",justify:d==="right"&&"flex-end",children:i&&i(l)}),l.collectionId+a))}),t(m,{overflowX:"auto",children:n.map(({title:i,textAlign:x,sx:d,render:a},v)=>c(F,{width:`calc(100% / ${n.length})`,children:[t(C,f(s({fontSize:"2xs"},d),{minWidth:"50px",justify:"flex-start",color:"mutedForeground",children:i})),t(T,f(s({},d),{minWidth:"50px",justify:"flex-start",children:a&&a(l)}))]},i+v))})]},l.collectionId)}return t(m,{borderBottom:"1px",borderColor:"muted",children:e.map(({render:n,sx:i,textAlign:x},d)=>t(T,f(s({},i),{justify:x==="right"&&"flex-end",children:n&&n(l)}),l.collectionId+d))},l.collectionId)}),!o.length&&c(j,{children:[t(S,{fontSize:"md",children:N}),t(S,{fontSize:"sm",color:"mutedForeground",children:W})]})]})})()})]})},P=X;export{P as default};
