1import{e as m,r as i,f,w,p as _,s as y,u as d,o as C}from"./vendor-D3ahWMFY.js";import{_ as h}from"./CreatorContentList.vue_vue_type_script_setup_true_lang-B61VRod8.js";import{a as S}from"./index-YqUjisW-.js";import"./MainLayout-IssbuzrT.js";import"./StatusBadge.vue_vue_type_script_setup_true_lang-CMU9YA8c.js";import"./ArrowLeftIcon-u3u3gHvg.js";import"./PlusIcon-DZsws9GA.js";const E=m({__name:"CreatorNewsHubView",setup(g){const o=y(),u=d(),n=i([]),r=i(!0);function c(e){var t;const s=((t=e==null?void 0:e.results)==null?void 0:t[0])||(e==null?void 0:e[0])||e;return(s==null?void 0:s.status)==="SUCCESS"&&Array.isArray(s.payload)?s.payload:[]}async function a(){r.value=!0;const e=await S.getBlogAdminList();if(e.success){const s=c(e.data);n.value=s.filter(t=>!!t.is_news_at)}r.value=!1}function l(){o.push({name:"CreatorNewsHubEdit",params:{postId:"new"},query:{news:"1"}})}function p(e){o.push({name:"CreatorNewsHubEdit",params:{postId:e.id},query:{news:"1"},state:{postData:JSON.stringify(e)}})}return f(a),w(()=>u.query.reload,e=>{e&&a()}),(e,s)=>(C(),_(h,{title:"News Hub","item-label":"News Article",items:n.value,loading:r.value,"empty-icon":"newspaper",onCreate:l,onSelect:p},null,8,["items","loading"]))}});export{E 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.