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