1import{P as x}from"./PostCard-DBKIbMCa.js";import{j as V,k as $,D as j,l as o,p as i,v as s,x as d,E as v,q as p,A as u,F as h,y as _,s as k,C as y,z as A,u as D,B as E,f as n,r as f}from"./vendor-vue-DgKPkTzM.js";import{h as C}from"./Button-Df9jM5Z5.js";import"./links-lgUQVf6P.js";import"./RegionSidebarSkeleton.vue_vue_type_script_setup_true_lang-Cx0WbN6u.js";import"./useBookmarks-DfGwopMX.js";import"./vendor-Dtr_Mrnh.js";import"./vendor-icons-C07lCRXW.js";import"./vendor-swiper-CmTBkzXo.js";const P={class:"mb-2 text-[28px] font-bold leading-[125%]"},T={class:"pb-4 text-[18px] leading-7"},z={class:"mb-4 flex gap-4"},I={key:0,class:"mb-6 grid grid-cols-4 gap-[10px]"},R={key:1,class:"mb-6 grid grid-cols-4 gap-[10px]"},q={class:"flex justify-end"},X=V({__name:"Story",props:{block:{},city:{}},setup(L){const r=L,S=n(()=>{var t;return((t=r.block.config)==null?void 0:t.title)||""}),B=n(()=>{var t;return((t=r.block.config)==null?void 0:t.subtitle)||""}),w=n(()=>{var t;return((t=r.block.config)==null?void 0:t.ctaLink)||""}),F=n(()=>{var t;return((t=r.block.config)==null?void 0:t.ctaLabel)||""}),c=f([]),m=f([]),a=f("highlight"),g=t=>{a.value=t};$(()=>{!c.value.length>0&&N()});const N=async()=>{try{const[t,e]=await Promise.all([C.get(`/api/articles/top-stories?prefecture_id=${r.city.prefecture_id}`),C.get(`/api/articles/latest-stories?prefecture_id=${r.city.prefecture_id}`)]);c.value=t.data.slice(0,4),m.value=e.data.slice(0,4)}catch(t){console.error("Error fetching data:",t)}};return(t,e)=>{const b=j("FontAwesomeIcon");return o(),i("div",null,[s("h2",P,d(S.value),1),s("p",T,d(B.value),1),s("div",z,[s("button",{class:v(["rounded border border-[#e9e9e9] px-3 py-2 text-[18px] font-semibold",a.value==="highlight"?"text-primary":""]),onClick:e[0]||(e[0]=l=>g("highlight"))},[p(b,{icon:["far","star"]}),e[2]||(e[2]=u(" Highlights ",-1))],2),s("button",{class:v(["rounded border border-[#e9e9e9] px-3 py-2 text-[18px] font-semibold",a.value==="latest"?"text-primary":""]),onClick:e[1]||(e[1]=l=>g("latest"))},[p(b,{icon:["far","clock"]}),e[3]||(e[3]=u(" Latest ",-1))],2)]),s("div",null,[a.value=="highlight"?(o(),i("div",I,[(o(!0),i(h,null,_(c.value,l=>(o(),k(x,{post:l},null,8,["post"]))),256))])):y("",!0),a.value=="latest"?(o(),i("div",R,[(o(!0),i(h,null,_(m.value,l=>(o(),k(x,{post:l},null,8,["post"]))),256))])):y("",!0),s("div",q,[p(D(E),{href:w.value,class:"flex flex-col justify-end rounded-[100px] border border-[#e9e9e9] px-5 py-[10px] text-base font-semibold text-[#292c3d] hover:underline"},{default:A(()=>[u(d(F.value),1)]),_:1},8,["href"])])])])}}});export{X as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.