1import{c as N,Z as b,r as n,j as e,g as a,ao as S,B as t,U as w,aP as k,a0 as P,I as C,a1 as x,a2 as m,a3 as h,a4 as j,a5 as l,L}from"./index-DMpD5zQ4.js";import{P as B}from"./ProjectCard-gUT8OKnz.js";import{u as I}from"./useFreelancing-BnM-2igD.js";import{P as A}from"./plus-BPK3OS2-.js";import"./badge-bMO3_tW7.js";import"./star-CrzUnXU9.js";import"./zap-k9RUzm2a.js";import"./clock-DpH3fNh0.js";import"./formatDistanceToNow-CmRQQnK2.js";/** 2 * @license lucide-react v0.462.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const D=N("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]),F=["all","Web Development","Mobile Development","UI/UX Design","Data Science","AI/ML","DevOps","Blockchain","Content Writing","Marketing","Other"],_=()=>{const{user:i}=b(),[p,u]=n.useState(""),[c,g]=n.useState("all"),[o,y]=n.useState("all"),[d,v]=n.useState("all"),{data:r,isLoading:f}=I({category:c!=="all"?c:void 0,experience_level:o!=="all"?o:void 0,budget_type:d!=="all"?d:void 0,search:p||void 0});return e.jsx("div",{className:"min-h-screen py-24",children:e.jsxs("div",{className:"container mx-auto px-4 lg:px-8",children:[e.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4 mb-8",children:[e.jsxs("div",{children:[e.jsxs(a,{to:"/freelancing",className:"inline-flex items-center text-muted-foreground hover:text-foreground mb-2 text-sm",children:[e.jsx(S,{className:"h-4 w-4 mr-1"}),"Back to Freelancing"]}),e.jsxs("h1",{className:"text-3xl font-bold",children:["Browse ",e.jsx("span",{className:"gradient-text-brand",children:"Projects"})]}),e.jsxs("p",{className:"text-muted-foreground mt-1",children:[(r==null?void 0:r.length)||0," open projects available"]})]}),e.jsxs("div",{className:"flex flex-wrap gap-3",children:[i&&e.jsxs(e.Fragment,{children:[e.jsx(a,{to:"/freelancing/profile",children:e.jsxs(t,{variant:"outline",className:"gap-2",children:[e.jsx(w,{className:"h-4 w-4"}),"Freelancer Profile"]})}),e.jsx(a,{to:"/freelancing/dashboard",children:e.jsxs(t,{variant:"outline",className:"gap-2",children:[e.jsx(k,{className:"h-4 w-4"}),"My Projects"]})}),e.jsx(a,{to:"/freelancing/post",children:e.jsxs(t,{className:"btn-premium gap-2",children:[e.jsx(A,{className:"h-4 w-4"}),"Post Project"]})})]}),!i&&e.jsx(a,{to:"/login",children:e.jsx(t,{className:"btn-premium",children:"Sign In to Post or Apply"})})]})]}),e.jsx("div",{className:"glass-card rounded-xl p-4 mb-8",children:e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-5 gap-4",children:[e.jsxs("div",{className:"md:col-span-2 relative",children:[e.jsx(P,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx(C,{placeholder:"Search projects...",value:p,onChange:s=>u(s.target.value),className:"pl-10"})]}),e.jsxs(x,{value:c,onValueChange:g,children:[e.jsx(m,{children:e.jsx(h,{placeholder:"Category"})}),e.jsx(j,{children:F.map(s=>e.jsx(l,{value:s,children:s==="all"?"All Categories":s},s))})]}),e.jsxs(x,{value:o,onValueChange:y,children:[e.jsx(m,{children:e.jsx(h,{placeholder:"Experience"})}),e.jsxs(j,{children:[e.jsx(l,{value:"all",children:"All Levels"}),e.jsx(l,{value:"beginner",children:"Beginner"}),e.jsx(l,{value:"intermediate",children:"Intermediate"}),e.jsx(l,{value:"expert",children:"Expert"})]})]}),e.jsxs(x,{value:d,onValueChange:v,children:[e.jsx(m,{children:e.jsx(h,{placeholder:"Budget Type"})}),e.jsxs(j,{children:[e.jsx(l,{value:"all",children:"All Types"}),e.jsx(l,{value:"fixed",children:"Fixed Price"}),e.jsx(l,{value:"hourly",children:"Hourly"})]})]})]})}),f?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(L,{className:"h-8 w-8 animate-spin text-primary"})}):r&&r.length>0?e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:r.map(s=>e.jsx(B,{project:s},s.id))}):e.jsxs("div",{className:"text-center py-20",children:[e.jsx(D,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),e.jsx("h3",{className:"text-xl font-semibold mb-2",children:"No projects found"}),e.jsx("p",{className:"text-muted-foreground mb-6",children:"Try adjusting your filters or check back later for new opportunities"}),i?e.jsx(a,{to:"/freelancing/post",children:e.jsx(t,{className:"btn-premium",children:"Post a Project"})}):e.jsx(a,{to:"/login",children:e.jsx(t,{className:"btn-premium",children:"Sign In to Get Started"})})]})]})})};export{_ 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.