1import{j as e,H as f,b as j,r as i,u as v,a as y,L as p,B as x}from"./index-B6jTtCPu.js";import{S}from"./SocialMeta-BdTJpkT5.js";import{P as N}from"./Pill-CmEvqP30.js";import{S as w}from"./SectionLabel-cKsbEITf.js";import{S as C}from"./SubmissionCard-DkwyLASZ.js";import{f as k}from"./formatting-BvzPpdGD.js";import{B}from"./featureFlags-BWvLFWO7.js";const I=["all","background","clothing","extra","hair","hat","head","other"],E=[{value:"newest",label:"Newest"},{value:"popular",label:"Most Popular"},{value:"oldest",label:"Oldest"}];function O(){return e.jsx("section",{className:"relative px-4 sm:px-8 lg:px-12 pt-10 pb-8 lg:pt-[60px] lg:pb-9",style:{background:"var(--bt-bg)",borderBottom:"2px solid var(--bt-line)"},children:e.jsxs("div",{className:"max-w-[1400px] mx-auto",children:[e.jsx(N,{tone:"solid",children:"// COMMUNITY"}),e.jsx("h1",{className:"sr-only",children:"BattleTabs Community"}),e.jsxs("div",{className:"flex items-end justify-between mt-3 gap-4 sm:gap-6 flex-wrap",children:[e.jsxs("div",{className:"font-display font-bold uppercase m-0 break-words",style:{fontSize:"clamp(40px, 8vw, 80px)",lineHeight:.95,letterSpacing:1,color:"var(--bt-ink)"},children:["Built by ",e.jsx("span",{style:{color:"var(--bt-accent)"},children:"Captains"}),"."]}),e.jsxs("div",{className:"flex flex-wrap gap-6 font-mono uppercase",style:{fontSize:11,color:"var(--bt-dim)",letterSpacing:1.5},children:[e.jsxs("span",{children:[e.jsx("span",{style:{color:"var(--bt-accent-3)"},children:"â"})," 20,194 ONLINE"]}),e.jsx("span",{children:"47 OPEN BOUNTIES"}),e.jsx("span",{children:"312 WIKI ARTICLES"})]})]})]})})}function T(){const{user:n}=j(),[s,o]=i.useState("all"),[l,a]=i.useState("newest"),[m,h]=i.useState(!1),[d,g]=i.useState(!1),c=v(y.submissions.getSubmissions,{status:"approved",category:s==="all"?void 0:s,sortBy:l,featured:m||void 0});return e.jsx("section",{className:"px-4 sm:px-8 lg:px-12 py-10 lg:py-12",style:{borderBottom:"2px solid var(--bt-line)",background:"var(--bt-bg)"},children:e.jsxs("div",{className:"max-w-[1400px] mx-auto",children:[e.jsxs("div",{className:"flex items-center justify-between mb-6 flex-wrap gap-3",children:[e.jsx("div",{className:"flex-1 min-w-[260px]",children:e.jsx(w,{num:"// 01",children:"Captain Submissions"})}),e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx(p,{to:"/community/guide",children:e.jsx(x,{size:"sm",tone:"ghost",children:"? Category Guide"})}),n&&e.jsx(p,{to:"/community/submit",children:e.jsx(x,{size:"sm",children:"+ New Submission"})})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4 p-4 mb-6",style:{background:"var(--bt-surface)",border:"2px solid var(--bt-line)",borderRadius:10,boxShadow:"inset 0 -3px 0 rgba(0,0,0,0.06), 0 3px 0 var(--bt-line)"},children:[e.jsxs("div",{className:"flex flex-wrap items-end gap-4",children:[e.jsx(u,{label:"Category",value:s,onChange:o,options:I.map(t=>({value:t,label:t==="all"?"All Categories":t[0].toUpperCase()+t.slice(1)}))}),e.jsx(u,{label:"Sort",value:l,onChange:a,options:E})]}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(b,{label:"Featured only",checked:m,onChange:h}),e.jsx(b,{label:"In game only",checked:d,onChange:g})]})]}),c===void 0?e.jsx("div",{className:"text-center py-12 font-mono",style:{color:"var(--bt-dim)"},children:"LOADINGâ¦"}):(()=>{const t=d?c.filter(r=>r.inGame):c;return t.length===0?e.jsx("div",{className:"text-center py-12 font-mono",style:{color:"var(--bt-dim)"},children:"NO SUBMISSIONS MATCH THESE FILTERS"}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"font-mono uppercase mb-4",style:{fontSize:11,color:"var(--bt-dim)",letterSpacing:1.5},children:[k(t.length)," APPROVED · ",s.toUpperCase()]}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-
15",children:t.map(r=>e.jsx(C,{s:r},r._id))})]})})()]})})}function u({label:n,value:s,onChange:o,options:l}){return e.jsxs("label",{className:"block",children:[e.jsx("div",{className:"font-mono uppercase mb-1",style:{fontSize:10,color:"var(--bt-dim)",letterSpacing:1.5},children:n}),e.jsx("select",{value:s,onChange:a=>o(a.target.value),className:"font-body cursor-pointer outline-none",style:{padding:"8px 12px",border:"2px solid var(--bt-line-soft)",borderRadius:6,fontSize:13,color:"var(--bt-ink)",background:"var(--bt-surface-alt)"},children:l.map(a=>e.jsx("option",{value:a.value,children:a.label},a.value))})]})}function b({label:n,checked:s,onChange:o}){return e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer font-body",style:{fontSize:13,color:"var(--bt-ink)"},children:[e.jsx("input",{type:"checkbox",checked:s,onChange:l=>o(l.target.checked)}),n]})}function H(){return e.jsxs(e.Fragment,{children:[e.jsx(S,{title:"Community â BattleTabs",description:"Browse cosmetic submissions created by BattleTabs captains. Vote on skins, ships, and decorations made by the community.",path:"/community",type:"website"}),e.jsx(f,{children:e.jsx("link",{rel:"alternate",type:"application/feed+json",title:"BattleTabs Community Submissions",href:"/community/submissions.json"})}),e.jsx(O,{}),B,e.jsx(T,{})]})}export{H 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.