1import{c as i,r as _,H as h,o as B,a as k}from"./_plugin-vue_export-helper-B-nq0EyN.js";import{u as L,a as w}from"./Validators-Bj3oL1Ej.js";import{c as x,u as b,b as d}from"./useBranding-BFy5n_0u.js";import{a as C,u as D}from"./index-BDqw8SWo.js";import{b7 as G}from"./DashboardIcon-BNHeRWnK.js";import{j as M}from"./dashboard-BxO4RE9t.js";import{A as V}from"./ArticleEditor-JqZNYV-n.js";import"./index-DN3rM4CW.js";import"./_commonjsHelpers-BosuxZz1.js";import"./utils.esm-CfIYYl8Y.js";import"./js.cookie-Cz0CWeBA.js";import"./index-BiJNB3Wq.js";import"./Icon-C6UTx21I.js";import"./index-C5QAEpou.js";import"./typing-BLWL-49c.js";import"./vue-dompurify-html-D_Dpv_Ot.js";import"./useKeyboardNavigableList-uoLl1yFe.js";import"./helper-BVTgYTlr.js";import"./module-CiEVyC2Y.js";import"./BarChart-DLqU6pMl.js";import"./constants-lVAyZKq6.js";import"./IframeLoader-CVQPRtmx.js";import"./HTMLSanitizer-cciupgGC.js";import"./HelpCenterLayout-C1SxSppa.js";const ut={__name:"PortalsArticlesEditPage",setup(H){const r=L(),n=w(),p=x(),{t:g}=b(),{articleSlug:l,portalSlug:o}=r.params,v=d("articles/articleById"),s=i(()=>v.value(l)),A=d("portals/portalBySlug"),f=i(()=>A.value(o)),c=_(!1),u=_(!1),E=i(()=>{var m;const{slug:t,locale:a}=s.value.category,{slug:e}=s.value,T=(m=f.value)==null?void 0:m.custom_domain;return M(o,t,a,e,T)}),y=async({...t})=>{c.value=!0;try{await p.dispatch("articles/update",{portalSlug:o,articleId:l,...t}),u.value=!0}catch(a){const e=(a==null?void 0:a.message)||g("HELP_CENTER.EDIT_ARTICLE_PAGE.API.ERROR");D(e)}finally{setTimeout(()=>{c.value=!1,u.value=!0},1500)}},S=i(()=>r.name==="portals_categories_articles_index"||r.name==="portals_categories_articles_edit"||r.name==="portals_categories_index"),R=()=>{const{tab:t,categorySlug:a,locale:e}=r.params;S.value?n.push({name:"portals_categories_articles_index",params:{categorySlug:a,locale:e}}):n.push({name:"portals_articles_index",params:{tab:t,categorySlug:a,locale:e}})},I=()=>{p.dispatch("articles/show",{id:l,portalSlug:o})},P=()=>{var t;window.open(E.value,"_blank"),C(G.PREVIEW_ARTICLE,{status:(t=s.value)==null?void 0:t.status})};return h(I),(t,a)=>(B(),k(V,{article:s.value,"is-updating":c.value,"is-saved":u.value,onSaveArticle:y,onPreviewArticle:P,onGoBack:R},null,8,["article","is-updating","is-saved"]))}};export{ut as default}; 2//# sourceMappingURL=PortalsArticlesEditPage-Btokm8IW.js.map
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.