import{Box as E,Flex as c,Image as P,Text as N}from"@chakra-ui/react";var r=(e,{height:o,quality:n})=>{if(e)return e.includes("imagedelivery.net")?e.includes("quality")?`${e},height=${o}`:`${e}/height=${o},quality=${n}`:e};import O from"dayjs";import"react";import{Flex as M,Image as D,Text as T}from"@chakra-ui/react";var s="https://imagedelivery.net/6iczWBYEbx_1dYNU7ek_bA/ed299f96-6a0f-4f97-cfcb-f8b0ae2ad500/medium",m="https://imagedelivery.net/6iczWBYEbx_1dYNU7ek_bA/9c899659-3749-4407-9669-7af913f10500/medium",p="https://imagedelivery.net/6iczWBYEbx_1dYNU7ek_bA/c34d29f2-060f-41ae-5eab-30bc2fa66800/medium",u="https://imagedelivery.net/6iczWBYEbx_1dYNU7ek_bA/b2d2f956-6eb6-4926-9fc4-e03465a03c00/medium",h="https://imagedelivery.net/6iczWBYEbx_1dYNU7ek_bA/571fbcf2-e0d5-4c72-847a-1bb87b327600/medium",b="https://imagedelivery.net/6iczWBYEbx_1dYNU7ek_bA/be0850de-021c-4d55-fbcd-8b859fea6300/medium",g="https://imagedelivery.net/6iczWBYEbx_1dYNU7ek_bA/308a8ad9-3ec3-42ff-2810-e2de9f0c2600/medium",x="https://imagedelivery.net/6iczWBYEbx_1dYNU7ek_bA/067c6d18-66ae-43df-bf2c-6e758c6a9300/medium",y="https://imagedelivery.net/6iczWBYEbx_1dYNU7ek_bA/4c38c9bd-a5c2-4b3c-2c14-f0d33b822000/medium",v="https://imagedelivery.net/6iczWBYEbx_1dYNU7ek_bA/5a5f445e-fb7c-45a8-787d-d15a9b7ff400/medium";import{useContext as Y}from"react";import{createContext as F,useCallback as Ee,useEffect as Ne,useState as Ie}from"react";import de from"axios";import{createContext as R,useMemo as Q}from"react";import{jsx as te}from"react/jsx-runtime";var X=R(void 0);import{jsx as he,jsxs as be}from"react/jsx-runtime";import{jsx as Re}from"react/jsx-runtime";var A=F(void 0);var C=()=>Y(A);import{jsx as w,jsxs as L}from"react/jsx-runtime";var z={SEA_DROP:g,FAIR:m,MAGIC_EDEN:u,MANIFOLD:p,ZORA:x,FOUNDATION:s,FOUNDATION_DROP:s,HEY_MINT:y,RARIBLE:h,LAUNCH_MY_NFT:b,GASLESS:v},U={SEA_DROP:"Open Sea",FAIR:"Fair",MAGIC_EDEN:"Magic Eden",MANIFOLD:"Manifold",ZORA:"Zora",FOUNDATION:"Foundation",FOUNDATION_DROP:"Foundation",HEY_MINT:"Hey Mint",RARIBLE:"Rarible",LAUNCH_MY_NFT:"Launch My Nft",FEATURED:"Featured",GASLESS:"Gasless"},B=({launchpad:e})=>{let{profile:o}=C(),{profileImage:n}=o||{};return L(M,{align:"center",ml:2,border:"1px solid",borderColor:"input",borderRadius:4,p:"2px",children:[w(D,{w:3,h:3,mr:1,borderRadius:5,src:e==="FEATURED"?`${r(n,{height:40})}`:z[e],objectFit:"contain"}),w(T,{noOfLines:1,fontSize:"2xs",color:"mutedForeground",children:U[e]})]})},i=B;import{useDispatch as W}from"react-redux";import{jsx as t,jsxs as l}from"react/jsx-runtime";var $=({collectionId:e,profileImage:o,name:n,isFeatured:I,launchedOn:d,startDate:_,onClickCollection:S,launchpad:a,isGasLessMint:k})=>{let H=W();return l(c,{alignItems:"center",onClick:()=>{S(e)},cursor:"pointer",minW:"full",children:[t(P,{src:o&&r(o,{height:100,quality:80}),fallback:t(E,{w:8,h:8,bg:"muted",borderRadius:"sm"}),w:"8",h:"8",borderRadius:"sm",alt:n,objectFit:"cover",loading:"lazy",decoding:"async"}),l(E,{ml:2,children:[l(c,{align:"center",justify:"space-between",children:[t(N,{noOfLines:1,fontWeight:"medium",fontSize:["xs","sm"],mr:1,lineHeight:1.4,flex:1,children:n}),I?t(i,{launchpad:"FEATURED"}):a!=="STANDARD"&&a!=="OTHERS"?t(i,{launchpad:a}):null,k&&t(i,{launchpad:"GASLESS"})]}),t(c,{align:"center",children:t(N,{noOfLines:1,fontSize:["2xs"],color:"mutedForeground",lineHeight:1.2,children:d==="just now"?O.unix(_).format("MMM DD YYYY, h:mm a"):d})})]})]})},Je=$;export{Je as default};
