import{f as v,h as y,d as L,j as b,_ as d}from"./index.DshNLnwE.js";import{u as p}from"./dynamic-import-helper.WPJ4Sxpg.js";import{d as I,I as D,L as T}from"./LinksTable.Ddux0Nwx.js";import{C as x,z as B,m as C,c as m,g as t,a as w,w as A,t as _,h as S,u as n,d as r,i as N,r as V,o as i,j as R}from"./runtime-dom.esm-bundler.B6m80oiY.js";import"./datetime.BBR3Qyzf.js";import"./Close.Dw9cx0sg.js";import"./_plugin-vue_export-helper.BN1snXvA.js";import"./Button.D5umMBI_.js";import"./numbers.yciV1dKa.js";import"./debounce.DK1RwK91.js";import"./QuestionMark.Cl0YQD9w.js";import"./Slide.DLGyHPNo.js";import"./Check.CMZaWYUb.js";import"./Close.DR3bRLdN.js";const j=v("LinkStatusDetailStore",{state:()=>({linkStatusId:0,linkStatus:{}}),actions:{resetState(){this.linkStatusId=0,this.linkStatus={}},getLinkStatusData(){return y.post(L.restUrl("link-status-detail/")).send({linkStatusId:this.linkStatusId}).then(l=>{this.linkStatus=l.body.linkStatus})}}}),z={class:"aioseo-blc-link-detail-page"},P={class:"header-container"},U={class:"first-row"},q={class:"second-row"},E={class:"first-column"},M={class:"header"},F={key:0,class:"load-progress"},G=4,at={__name:"LinkStatusDetail",setup(l){const u="aioseo-broken-link-checker",a=I(),s=j(),f=b(),c={backToLinks:d("Back to All Links",u),loading:d("Loading...",u)},e=x(!0),h=B(()=>e.value?c.loading:s.linkStatus.url);return C(()=>{s.resetState(),a.resetState();const o=p().currentRoute.value.query.linkStatusId;if(!o){p().push({name:"broken-links"});return}s.linkStatusId=o,s.getLinkStatusData(),a.linkStatusId=o,a.fetchData({limit:f.settings.tablePagination.linksTable,offset:0,searchTerm:""}).finally(()=>{e.value=!1})}),(g,o)=>{const k=V("router-link");return i(),m("div",z,[t("div",P,[t("div",U,[w(k,{to:{name:"broken-links"}},{default:A(()=>[R(" ← "),t("span",null,_(c.backToLinks),1)]),_:1})]),t("div",q,[t("div",E,[t("span",M,_(h.value),1),e.value?r("",!0):(i(),S(n(D),{key:0,linkStatus:n(s).linkStatus},null,8,["linkStatus"]))])])]),e.value?(i(),m("div",F,[t("div",{class:"load-progress-value",style:N({animationDuration:G+"s"})},null,4)])):r("",!0),e.value?r("",!0):(i(),S(n(T),{key:1,linkStatus:n(s).linkStatus,links:n(a).links},null,8,["linkStatus","links"]))])}}};export{at as default};
