const __vite__fileDeps=["./Bi8tNtoh.js","./CnM4dBY0.js","./entry.DUK295Ir.css","./Bf9Fxc0i.js","./DvyjNMPb.js","./DslTMqll.js","./faSort.A2zKi7tD.css"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]); import{D as u,E as _,G as l,J as i,x as e,h as a,C as s,T as t,F as h,n as g,j as b,z as f,l as k,U as w,k as $,H as d}from"./CnM4dBY0.js";const v=_({name:"InspirationResults",components:{InspirationCard:l(()=>d(()=>import("./Bi8tNtoh.js").then(o=>o.I),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url)),AnimatedSpin:l(()=>d(()=>import("./CnM4dBY0.js").then(o=>o.b7),__vite__mapDeps([1,2]),import.meta.url))},props:["results","loading","total"],computed:{disableLoadMore(){return this.loading||(this.results||[]).length>=this.total}},methods:{loadMorePages(){this.$emit("loadmore")},scrollToTop(){window.scroll({top:0,left:0,behavior:"smooth"})}}},"$BO0i4DcpbX"),C={class:"max-w-screen-xl mx-auto my-5 px-5"},y={class:"h5 heading ml-2"},T={key:0},I={id:"inspiration-results-container",class:"inspiration-card-results-container grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-5 mx-2 lg:grid-cols-4 grid-flow-row-dense"},B={class:"text-center p-5"},E={class:"w-full"},L=["disabled"],M={key:1,class:"text-center"},N={key:2,class:"text-right max-w-screen-xl mx-auto pb-2"},P={class:"mr-1"};function V(o,r,D,x,A,S){const p=i("InspirationCard"),c=i("font-awesome-icon");return e(),a("div",C,[s("span",y,t(o.$t("Search results"))+": "+t(o.total),1),o.results.length?(e(),a("div",T,[s("div",I,[(e(!0),a(h,null,g(o.results,(n,m)=>(e(),b(p,{key:m,card:n},null,8,["card"]))),128))]),s("div",B,[s("p",E,t(`${o.results.length}/${o.total}`),1),s("button",{class:f(["text-white font-semibold p-3 rounded-md",o.disableLoadMore?"bg-gray-300":"bg-lappset-sky-900"]),disabled:o.disableLoadMore,onClick:r[0]||(r[0]=(...n)=>o.loadMorePages&&o.loadMorePages(...n))},t(o.$t("Show more pages")),11,L)])])):(e(),a("div",M,t(o.$t("No results")),1)),o.results.length>12&&!o.loading?(e(),a("div",N,[s("button",{id:"scroll-to-top-button",class:"px-2 inline-table text-black font-bold my-2",onClick:r[1]||(r[1]=(...n)=>o.scrollToTop&&o.scrollToTop(...n))},[s("span",P,[k(c,{icon:["far","arrow-up"]})]),w(" "+t(o.$t("Back to top")),1)])])):$("",!0)])}const R=u(v,[["render",V]]);export{R as _};