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