1import{j as s,D}from"./index-Rp4lB5UJ.js";import{r as e}from"./react-BCD9guCi.js";import{c as I,u as N,a as S,L as f}from"./reactRouter-Ba3CW5yQ.js";import{W as E,B as T,a as A,j as L,k as M,N as _,d as R,e as W,f as g,g as P,h as z,i as F}from"./detailView-Yk0kdxNN.js";import{C as H}from"./index-Ckwqbws-.js";import{e as v}from"./axios-DszxQjEy.js";import{A as O}from"./aos-CsjxBUUb.js";import"./lodash-D0k_Pfnd.js";import"./axios-Cm0UX6qg.js";const ss=()=>{const p=I().id,a=N(),B=S(),[n,k]=e.useState({}),[o,w]=e.useState([]),[t,l]=e.useState(null),[i,u]=e.useState(null),[c,m]=e.useState(null),[j,U]=e.useState(0);e.useEffect(()=>{O.init()},[]),e.useEffect(()=>{a.state&&a.state.index!==void 0&&l(a.state.index)},[a.state]),e.useEffect(()=>($(),()=>{u(null),m(null)}),[p,j]),e.useEffect(()=>{if(t!==null){const r=t-1,d=t+1,x=o[r]||null,h=o[d]||null;u(x),m(h)}},[t,o]);const $=async()=>{try{const r=await v.get(`https://prdt.ybtour.co.kr/esntl/api/company/news/press/${p}`),{body:d}=r.data;k(d);const x=await v.get("https://prdt.ybtour.co.kr/esntl/api/company/news/press"),{body:h}=x.data;w(h)}catch(r){console.error("Error fetching data:",r)}},b=()=>{t>0&&l(t-1)},y=()=>{t<o.length-1&&l(t+1)},C=()=>{B("/pr/news",{state:{activeTabIndex:j}})};return s.jsx(s.Fragment,{children:s.jsx(E,{children:s.jsx(H,{$position:"wrap",$background:"white",children:s.jsx("div",{className:"aos-init","data-aos":"fade-up","data-aos-duration":"1000",children:s.jsxs(T,{children:[s.jsxs(A,{children:[s.jsx("h3",{children:n.title}),s.jsx("span",{children:n.regDt&&n.regDt.split(" ")[0].replace(/-/g,".")})]}),s.jsx(L,{children:s.jsx("img",{src:`https://cimgcdn.ybtour.co.kr${n.imgPath}`,alt:n.title,width:"100%",height:"100%"})}),s.jsx(M,{dangerouslySetInnerHTML:{__html:n.contents}}),s.jsx(_,{children:s.jsx("a",{href:n.contUrl,target:"_blank",children:"ê¸°ì¬ ì문 보기"})}),i||c?s.jsxs(R,{children:[i&&s.jsx(W,{children:s.jsxs(f,{to:`/pr/news/press/${i.newsNo}`,onClick:b,children:[s.jsx(g,{children:"ì´ì ê¸"}),s.jsx(P,{children:i.title})]})}),c&&s.jsx(z,{children:s.jsxs(f,{to:`/pr/news/press/${c.newsNo}`,onClick:y,children:[s.jsx(g,{children:"ë¤ìê¸"}),s.jsx(P,{children:c.title})]})})]}):null,s.jsx(F,{children:s.jsx(D,{$variant:"basic",size:"sm",onClick:C,children:"목ë¡ë³´ê¸°"})})]})})})})})};export{ss 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.