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