import{r as u,w as L,u as $,c as n,a as e,k as m,v as F,e as i,i as x,F as B,f as I,b as v,l as p,g as k,h as A,o as d,n as T,t as _}from"./entry.0b5aa3d9.js";import{_ as y}from"./search.b7b33edb.js";const V={class:"animate-fade w-full"},R={class:"bg-white uhjk py-6 mt-6 w-[90%] mx-auto rounded-xl my-12",style:{border:"1.4px solid #EFEFEF"}},j={class:"sm:flex items-center w-full mt-8 px-4 mx-auto"},D={class:"w-full mt-8 grid grid-cols-1 sm:grid-cols-2 gap-6"},M={style:{border:"1px solid #EFEFEF"},class:"sm:flex items-center rounded-xl p-4"},S={class:"flex-none"},z={class:"sm:px-6 ui"},N=["onClick"],H={class:"line-clamp-2"},q={class:"mt-1 text-[#7F7F7F]"},G={class:"line-clamp-2"},J={class:"mt-5 flex items-center justify-between"},K={class:"flex items-center"},O={class:"flex-0 mr-2"},Q={class:"flex-1"},W={class:"text-base font-medium"},se={__name:"index",async setup(X){let c,b;const l=u(null),r=u(null),o=u(1),f=u(0),{data:C,total:P}=([c,b]=L(()=>$fetch(p().public.API_PUBLIC_URL+"/api/prestasi?limit=6&page=1&fakultas=a504d52c-d68c-4ca7-8aaf-9afdbb99d75c")),c=await c,b(),c);r.value=C,f.value=Math.ceil(P/6);async function E(){let a;if(l.value?a=await $fetch(p().public.API_PUBLIC_URL+`/api/prestasi?limit=6&page=${o.value}&search=${l.value}&fakultas=a504d52c-d68c-4ca7-8aaf-9afdbb99d75c`):a=await $fetch(p().public.API_PUBLIC_URL+`/api/prestasi?limit=6&page=${o.value}&fakultas=a504d52c-d68c-4ca7-8aaf-9afdbb99d75c`),r.value=a.data,navigator.userAgent.includes("Chrome")){window.scrollTo({behavior:"smooth",top:0,left:0});return}windowScrollTo(window,{behavior:"smooth",top:0,left:0})}async function h(){const{data:a,total:s}=await $fetch(p().public.API_PUBLIC_URL+`/api/prestasi?limit=100&page=1&search=${l.value}&fakultas=a504d52c-d68c-4ca7-8aaf-9afdbb99d75c`);r.value=a,f.value=Math.ceil(s/6)}return $({title:"Prestasi"}),(a,s)=>{const g=k("v-img"),U=k("v-pagination"),w=A("ripple");return d(),n("div",V,[e("div",R,[s[6]||(s[6]=e("div",{class:"sm:flex items-center justify-between w-full pb-4",style:{"border-bottom":"1px solid #EFEFEF"}},[e("h1",{class:"font-bold"},"Prestasi Prodi Teknik Sipil ")],-1)),e("div",j,[m(e("input",{"onUpdate:modelValue":s[0]||(s[0]=t=>x(l)?l.value=t:null),class:"bg-[#F8F8F8] flex-1 sm:flex hidden rounded-xl px-4 h-[50px]",placeholder:"Cari Prestasi Fakultas"},null,512),[[F,i(l)]]),m(e("input",{"onUpdate:modelValue":s[1]||(s[1]=t=>x(l)?l.value=t:null),class:"flex sm:hidden bg-[#F8F8F8] w-full rounded-xl px-4 h-[50px]",placeholder:"Cari Prestasi Fakultas"},null,512),[[F,i(l)]]),m((d(),n("button",{onClick:h,class:"text-base sm:text-lg hidden sm:flex items-center flex-none bg-[#B91C1C] text-white ml-2 rounded-xl font-semibold text-center px-8 py-3"},s[3]||(s[3]=[e("div",{class:"mr-1"},"Cari",-1),e("img",{src:y},null,-1)]))),[[w]]),m((d(),n("button",{onClick:h,class:"text-base sm:text-lg flex sm:hidden items-center w-full justify-center mt-3 flex-none bg-[#2E8586] text-white rounded-xl font-semibold text-center px-8 py-3"},s[4]||(s[4]=[e("div",{class:"mr-1"},"Cari",-1),e("img",{src:y},null,-1)]))),[[w]])]),e("div",D,[(d(!0),n(B,null,I(i(r),t=>(d(),n("div",M,[e("div",S,[v(g,{cover:"",src:t.thumbnail,class:"rounded-xl w-full sm:w-[180px] sm:h-[140px] h-[260px]"},null,8,["src"])]),e("div",z,[s[5]||(s[5]=e("div",{class:"uppercase tracking-widest font-semibold text-[#2E8586]"},[e("span",null,"Prestasi Fakultas")],-1)),e("div",{class:"text-2xl font-semibold cursor-pointer",onClick:Y=>("navigateTo"in a?a.navigateTo:i(T))("/prestasi/"+t.slug)},[e("span",H,_(t.title),1)],8,N),e("div",q,[e("span",G,_(t.description),1)]),e("div",J,[e("div",K,[e("div",O,[v(g,{src:"/avatar.png",width:"30"})]),e("div",Q,[e("div",W,[e("span",null,_(t.created_by),1)])])])])])]))),256))]),v(U,{size:(a.$vuetify.display.mobile,"small"),class:"mt-10 mb-6",modelValue:i(o),"onUpdate:modelValue":[s[2]||(s[2]=t=>x(o)?o.value=t:null),E],"total-visible":5,length:i(f)},null,8,["size","modelValue","length"])])])}}};export{se as default};
