import{d as o,Q as i,o as d}from"./vendor-element-plus.js?ver=3.0.6";import{bi as s,b1 as e,A as t,J as a,c5 as c,x as n,I as l,br as r,aO as h}from"./vendor.js?ver=3.0.6";import{_,I as m}from"./fc-bits-ui.js?ver=3.0.6";const w={class:"fc_inline_doc",style:{display:"inline-block"}},p={class:"icon"},u=["innerHTML"],f={key:1,class:"doc_read"};const b=_({name:"InlineDoc",components:{Icons:m},props:["doc_id","btn_class"],data:()=>({loading:!1,doc:{},show_doc:!1,direction:"rtl",docSize:"700px",isLoaded:!1}),methods:{showDoc(){this.show_doc=!0,this.isLoaded||this.getDoc()},getDoc(){this.loading=!0,this.$get("docs/"+this.doc_id).then(o=>{this.doc=o}).catch(o=>{this.handleError(o)}).finally(()=>{this.loading=!1,this.isLoaded=!0})}},mounted(){window.fcAdmin&&window.fcAdmin.is_rtl&&(this.direction="ltr"),window.outerWidth<701&&(this.docSize=window.outerWidth-50+"px")}},[["render",function(_,m,b,v,g,y){const I=s("Icons"),k=o,z=i,D=d;return e(),t("div",w,[a(k,{title:_.$t("View related documentation"),class:h(b.btn_class),onClick:y.showDoc},{default:c(()=>[n("span",p,[a(I,{"icon-name":"graduationCap"})]),l(" "+r(_.$t("Tutorial")),1)],void 0),_:1},8,["title","class","onClick"]),a(D,{modelValue:g.show_doc,"onUpdate:modelValue":m[0]||(m[0]=o=>g.show_doc=o),title:g.doc.title,"append-to-body":!0,size:g.docSize,direction:g.direction,"header-class":"fc_doc_drawer_header","body-class":"fc_doc_drawer_body"},{default:c(()=>[g.loading?(e(),t("div",f,[a(z,{animated:!0,rows:10})])):(e(),t("div",{key:0,class:"doc_read",innerHTML:g.doc.content},null,8,u))],void 0),_:1},8,["modelValue","title","size","direction"])])}]]);export{b as I};