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