import{a as W,b as O}from"/build/_shared/chunk-OHEW2553.js";import{a as B,b as M,c as U}from"/build/_shared/chunk-I5Q7WLJC.js";import{a as $,c as C,d as b,e as F,n as _,t as j,u as z,v as I}from"/build/_shared/chunk-WRTB4GZ2.js";import"/build/_shared/chunk-OW52VRSG.js";import{e as H}from"/build/_shared/chunk-FT6CVJYS.js";import"/build/_shared/chunk-O46BKFWV.js";import"/build/_shared/chunk-ZHPXAORZ.js";import"/build/_shared/chunk-SKVU7MMG.js";import{g as R,i as L,m as T,n as V}from"/build/_shared/chunk-5OH6P3GJ.js";import{a as N}from"/build/_shared/chunk-ZUBD5LGO.js";import{a as D}from"/build/_shared/chunk-ZXLMDTT4.js";import{d as m}from"/build/_shared/chunk-G5WX4PPA.js";var te=m(B(),1);var K=m($(),1);var q=m(D(),1);var e=m(N(),1);function J({actionData:l,className:a}){let[p,n]=(0,q.useState)(!1),t=l||{};return(0,e.jsxs)(b.section,{layout:!0,transition:{duration:.5,ease:"easeInOut"},className:I("",a),children:[(0,e.jsx)("div",{className:"fostr-grid",children:(0,e.jsx)("p",{onClick:()=>n(!p),className:"relative col-start-1 col-end-5 w-fit cursor-pointer break-normal text-2xl after:absolute after:bottom-2 after:left-0 after:h-1 after:w-full after:bg-dark after:content-[''] md:col-start-2 md:col-end-4 lg:col-start-2 lg:col-end-7",children:"Contact Us"})}),(0,e.jsx)(F,{initial:!1,children:p&&(0,e.jsx)(b.div,{className:"overflow-hidden",initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{height:{type:"spring",duration:.4,bounce:0}},children:(0,e.jsxs)(R,{method:"post",noValidate:!0,children:[(0,e.jsxs)("fieldset",{className:"fostr-grid gap-y-16 pt-32",children:[(0,e.jsx)("input",{type:"hidden",name:"_subject",value:"Website Contact Form"}),(0,e.jsx)("input",{type:"hidden",name:"_format",value:"plain"}),(0,e.jsxs)("div",{className:"relative col-span-full flex flex-col md:col-span-3 md:col-start-2 lg:col-span-5 lg:col-start-2",children:[(0,e.jsx)("label",{className:"pb-8 font-secondary text-sm",htmlFor:"first-name",children:"First Name"}),(0,e.jsx)("input",{className:"appearance-none border-b border-b-dark bg-transparent pb-4 font-secondary placeholder:text-dark focus:outline-none focus:placeholder:text-opacity-50",type:"text",name:"first-name",id:"first-name"}),t?.firstname?(0,e.jsx)("span",{className:"absolute -bottom-10 font-secondary text-xs text-error",children:t?.firstname}):null]}),(0,e.jsxs)("div",{className:"relative col-span-full flex flex-col md:col-span-3 lg:col-span-5",children:[(0,e.jsx)("label",{className:"pb-8 font-secondary text-sm",htmlFor:"last-name",children:"Last Name"}),(0,e.jsx)("input",{className:"appearance-none border-b border-b-dark bg-transparent pb-4 font-secondary placeholder:text-dark focus:outline-none focus:placeholder:text-opacity-50",type:"text",name:"last-name",id:"last-name"}),t?.lastname?(0,e.jsx)("span",{className:"absolute -bottom-10 font-secondary text-xs text-error",children:t?.lastname}):null]}),(0,e.jsxs)("div",{className:"relative col-span-full flex flex-col md:col-span-3 md:col-start-2 lg:col-span-5 lg:col-start-2",children:[(0,e.jsx)("label",{className:"pb-8 font-secondary text-sm",htmlFor:"email",children:"Email Address"}),(0,e.jsx)("input",{className:"appearance-none border-b border-b-dark bg-transparent pb-4 font-secondary placeholder:text-dark focus:outline-none focus:placeholder:text-opacity-50",type:"email",name:"email",id:"email"}),t?.email?(0,e.jsx)("span",{className:"absolute -bottom-10 font-secondary text-xs text-error",children:t.email}):null]}),(0,e.jsxs)("div",{className:"relative col-span-full flex flex-col md:col-span-3 lg:col-span-5",children:[(0,e.jsx)("label",{className:"pb-8 font-secondary text-sm",htmlFor:"phone",children:"Phone"}),(0,e.jsx)("input",{className:"appearance-none border-b border-b-dark bg-transparent pb-4 font-secondary placeholder:text-dark focus:outline-none focus:placeholder:text-opacity-50",type:"text",name:"phone",id:"phone"}),t?.phone?(0,e.jsx)("span",{className:"absolute -bottom-10 font-secondary text-xs text-error",children:t?.phone}):null]}),(0,e.jsxs)("div",{className:"relative col-span-full flex flex-col md:col-span-3 md:col-start-2 lg:col-span-5 lg:col-start-2",children:[(0,e.jsx)("label",{className:"pb-8 font-secondary text-sm",htmlFor:"company-name",children:"Company Name"}),(0,e.jsx)("input",{className:"appearance-none border-b border-b-dark bg-transparent pb-4 font-secondary placeholder:text-dark focus:outline-none focus:placeholder:text-opacity-50",type:"text",name:"company-name",id:"company-name"}),t?.company?(0,e.jsx)("span",{className:"absolute -bottom-10 font-secondary text-xs text-error",children:t?.company}):null]}),(0,e.jsxs)("div",{className:"relative col-span-full flex flex-col md:col-span-3 lg:col-span-5",children:[(0,e.jsx)("label",{className:"pb-8 font-secondary text-sm",htmlFor:"project-type",children:"Type of Project"}),(0,e.jsx)("div",{className:"relative",children:(0,e.jsxs)("select",{className:"w-full appearance-none border-b border-b-dark bg-transparent pb-4 font-secondary placeholder:text-dark focus:outline-none focus:placeholder:text-opacity-50",name:"project-type",id:"project-type",children:[(0,e.jsx)("option",{value:"select",children:"Select Option"}),(0,e.jsx)("option",{value:"Web & eCommerce solutions",children:"Web & eCommerce solutions"}),(0,e.jsx)("option",{value:"Shopify Plus development",children:"Shopify Plus development"}),(0,e.jsx)("option",{value:"Replatforming",children:"Replatforming"}),(0,e.jsx)("option",{value:"Design, UX & UI",children:"Design, UX & UI"}),(0,e.jsx)("option",{value:"Integrations",children:"Integrations"}),(0,e.jsx)("option",{value:"Internationalisation",children:"Internationalisation"})]})}),t?.type?(0,e.jsx)("span",{className:"absolute -bottom-10 font-secondary text-xs text-error",children:t.type}):null]}),(0,e.jsxs)("div",{className:"relative col-span-full flex flex-col md:col-span-6 md:col-start-2 lg:col-span-10 lg:col-start-2",children:[(0,e.jsx)("label",{className:"pb-8 font-secondary text-sm",htmlFor:"message",children:"Message"}),(0,e.jsx)("textarea",{className:"appearance-none border-b border-b-dark bg-transparent pb-4 font-secondary placeholder:text-dark focus:outline-none focus:placeholder:text-opacity-50",name:"message",id:"message"}),t?.message?(0,e.jsx)("span",{className:"absolute -bottom-10 font-secondary text-xs text-error",children:t.message}):null]})]}),(0,e.jsx)("div",{className:"fostr-grid mt-16",children:(0,e.jsx)("button",{className:"col-span-full rounded-full border py-6 md:col-span-3 md:col-start-5 lg:col-span-5 lg:col-start-7",type:"submit",children:"Send Message"})}),t?.badResponse?(0,e.jsx)("div",{className:"fostr-grid mt-16",children:(0,e.jsx)("p",{className:"col-span-full font-secondary text-error md:col-start-2",children:t?.badResponse})}):null]})})})]})}var G=J;var X=m(D(),1);var o=m(N(),1);function Z({dataCaseStudy:l,className:a,index:p,listView:n,mousePosition:t}){let{title:d,mainImage:c,categories:f,shopifyPlus:k,slug:x}=l,{width:y}=z(),[i]=C(),[g,u]=(0,X.useState)(!1),h=()=>{u(!0)},E=()=>{u(!1)};return n?(0,o.jsxs)("div",{onMouseEnter:h,onMouseLeave:E,children:[y>768&&(0,o.jsx)(b.span,{animate:{left:t.x+15,top:t.y-7},transition:{top:{duration:.2,transition:{ease:"easeIn"}},left:{duration:.2,transition:{ease:"easeIn"}}},className:`pointer-events-none fixed z-[100] text-xs ${g?"opacity-1":"opacity-0"}`,children:"View Case Study"}),(0,o.jsx)(L,{to:x.current,className:I("flex cursor-pointer flex-col",a),children:(0,o.jsxs)("div",{className:"fostr-grid items-center py-8 lg:py-0",children:[(0,o.jsxs)("span",{className:"hidden font-secondary text-sm md:col-start-2 md:col-end-3 md:block",children:["00 - ",p]}),d?(0,o.jsx)("h2",{className:"col-span-full md:col-start-3 md:col-end-6 lg:col-start-3 lg:col-end-7",children:d}):null,f?.length>0?(0,o.jsxs)("ul",{className:"col-span-full flex flex-wrap gap-4 pt-2 md:col-start-6 md:col-end-9 lg:col-start-7 lg:col-end-11",children:[f.map((S,P)=>(0,o.jsxs)("li",{className:"font-secondary text-sm",children:[S.title,P<f.length-1?" \u2014":null]},S._id)),k?(0,o.jsx)("li",{className:"font-secondary text-sm",children:"\u2014 Shopify Plus"}):null]}):null,c?(0,o.jsx)(_,{alt:d,crop:c.crop,hotspot:c.hotspot,layout:"responsive",sizes:["15vw"],src:c?.asset?._ref,className:"lg:col-star-10 hidden aspect-square h-auto w-full object-cover md:col-end-8 lg:col-end-12 lg:block"}):null]})})]}):(0,o.jsxs)(o.Fragment,{children:[y>768&&(0,o.jsx)(b.span,{animate:{left:t?.x+15,top:t?.y-7},transition:{top:{duration:.2,transition:{ease:"easeIn"}},left:{duration:.2,transition:{ease:"easeIn"}}},className:`pointer-events-none fixed z-[100] text-xs mix-blend-exclusion ${g?"opacity-1":"opacity-0"} ${i=="light"?"text-light":"text-dark"}`,children:"View Case Study"}),(0,o.jsxs)(L,{to:x.current,className:I("flex flex-col",a),children:[(0,o.jsx)("div",{onMouseEnter:h,onMouseLeave:E,children:c?(0,o.jsx)(U,{className:"aspect-square",src:c.asset?._ref,crop:c?.crop,hotspot:c?.hotspot,layout:"responsive",sizes:["50vw"],alt:d}):null}),(0,o.jsxs)("div",{className:"apply-padding flex flex-col p-8 pb-0",children:[(0,o.jsxs)("div",{className:"flex items-center justify-between",children:[d?(0,o.jsx)("h2",{className:"",children:d}):null,(0,o.jsxs)("span",{className:"font-secondary text-sm",children:["00 - ",p]})]}),f?.length>0?(0,o.jsxs)("ul",{className:"flex flex-wrap gap-4 pt-2",children:[f.map((S,P)=>(0,o.jsxs)("li",{className:"font-secondary text-sm",children:[S.title,P<f.length-1?" \u2014":null]},S._id)),k?(0,o.jsx)("li",{className:"font-secondary text-sm",children:"\u2014 Shopify Plus"}):null]}):null]})]})]})}var A=Z;var w=m(D(),1),s=m(N(),1);function ee({filteredWork:l,listView:a,allCaseStudies:p}){let[n,t]=(0,w.useState)(!1),[d=null,c]=(0,w.useState)(null),[f,k]=(0,w.useState)({x:0,y:0}),[x,y]=(0,w.useState)({x:0,y:0});return(0,w.useEffect)(()=>{let i=u=>{let h=Math.min(u.clientX,window.innerWidth-20);requestAnimationFrame(()=>{y({x:h+2,y:u.clientY-4})})},g=u=>{k({x:u.clientX,y:u.clientY})};return window.addEventListener("mousemove",i),window.addEventListener("mousemove",g),()=>{window.removeEventListener("mousemove",i),window.removeEventListener("mousemove",g)}},[]),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(F,{initial:!1,mode:"popLayout",children:a&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(O,{currImage:d,showFloatingImage:n,filteredWork:p,mousePositionX:f.x,mousePositionY:f.y}),(0,s.jsx)(b.ul,{onMouseEnter:()=>t(!0),onMouseLeave:()=>t(!1),initial:{opacity:0},animate:{opacity:1,transition:{duration:.5,delay:.5}},exit:{opacity:0},className:"relative z-10 my-16 mb-32 flex w-full flex-col",children:l.length>0?l.map((i,g)=>(0,s.jsx)(b.li,{layout:!0,className:"col-span-full border-t last:border-b",onMouseEnter:()=>{console.log("caseStudy?.mainImage",i?.mainImage),c(i?.mainImage)},initial:{opacity:0},animate:{opacity:1,transition:{duration:.3}},exit:{opacity:0},children:(0,s.jsx)(A,{index:g,mousePosition:x,dataCaseStudy:i,listView:a})},i._id)):(0,s.jsx)("div",{className:"col-span-full text-center",children:"No Case Studies found"})})]})}),(0,s.jsx)(F,{initial:!1,mode:"popLayout",children:!a&&(0,s.jsx)(b.ul,{initial:{opacity:0},animate:{opacity:1,transition:{duration:.3,delay:.3}},exit:{opacity:0},className:"flex w-full flex-wrap gap-y-32 py-16 pb-32 md:gap-x-8",children:l.length>0?l.map((i,g)=>(0,s.jsx)(b.li,{layout:!0,className:"odd-padding w-full md:w-[calc(50%-0.8rem)] lg:col-span-6 ",initial:{opacity:0},animate:{opacity:1,transition:{duration:.3}},exit:{opacity:0},children:(0,s.jsx)(A,{index:g,dataCaseStudy:i,listView:a,mousePosition:x})},i._id)):(0,s.jsx)("div",{className:"col-span-full text-center",children:"No Case Studies found"})})})]})}var Y=ee;var v=m(D(),1);var r=m(N(),1),oe=()=>[{rel:"stylesheet",href:"https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css"}],ae=({data:l})=>{let a=l?.initial?.data?.seo[0].seo||{};return[{title:a.title?a.title:""},{name:"description",content:a.description?a.description:""},{property:"og:title",content:a.ogTitle?a.ogTitle:""},{property:"og:description",content:a.ogDescription?a.ogDescription:""},{property:"og:image",content:a.image?j(a.image).url():""}]};function Q(){let{initial:l,query:a,params:p}=T(),{data:n,loading:t}=H(a,p,{initial:l}),d=V();return t&&!n?(0,r.jsx)("div",{children:"Loading..."}):n?(0,r.jsx)(ne,{workData:n,actionData:d}):null}function ne({workData:l,actionData:a}){let[,p]=C(),n=l.work,[t,d]=(0,v.useState)([]),[c,f]=(0,v.useState)("by-vertical"),[k,x]=(0,v.useState)(n),[y,i]=(0,v.useState)(!1),g=()=>{i(!y),window.localStorage.setItem("listView",y?"false":"true")};return(0,v.useEffect)(()=>{window.localStorage.getItem("listView")=="true"?i(!0):i(!1)},[]),(0,v.useEffect)(()=>{p(y?()=>"dark":()=>"light")},[y,p]),(0,v.useEffect)(()=>{c=="by-vertical"?t.length==0?x(n):x(n.filter(u=>u?.categories?.some(h=>t.includes(h.title)))):c=="by-service"&&(t.length==0?x(n):x(n.filter(u=>u?.services?.some(h=>t.includes(h.title)))))},[t,n]),(0,v.useEffect)(()=>{d([])},[c]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("section",{className:"fostr-grid",children:(0,r.jsx)("h1",{className:"col-span-full flex justify-between py-16 text-2xl md:col-start-5 lg:col-start-7 lg:text-4xl",children:(0,r.jsx)("span",{children:"Our Work"})})}),(0,r.jsx)(M,{className:"py-16",copyLeft:"// Case Studies",copyRight:"Grid \u2014 List",showGridButton:!0,setListView:g,listView:y}),(0,r.jsxs)("section",{className:"w-full",children:[(0,r.jsx)(W,{categories:l.categories,services:l.services,setFilters:d,filters:t,filtersType:c,setFiltersType:f}),(0,r.jsx)(Y,{filteredWork:k,allCaseStudies:n,listView:y})]}),(0,r.jsx)(M,{className:"py-32",copyLeft:"// Start A Project",copyRight:"\u2014 Fostr"}),(0,r.jsx)(G,{actionData:a})]})}export{Q as default,oe as links,ae as meta};