import{k as o,aB as i,aT as d}from"./vendor-element-plus.js?ver=3.1.8";import{aQ as s,W as e,X as a,ab as t,a5 as c,Z as n,a9 as l,aa as r,a0 as h}from"./vendor.js?ver=3.1.8";import{_,I as m}from"./fc-bits-ui.js?ver=3.1.8";const w={class:"fc_inline_doc",style:{display:"inline-block"}},p={class:"icon"},u=["innerHTML"],f={key:1,class:"doc_read"};const v=_({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,v,b,g,y){const k=s("Icons"),z=o,D=i,I=d;return e(),a("div",w,[t(z,{title:_.$t("View related documentation"),class:h(v.btn_class),onClick:y.showDoc},{default:c(()=>[n("span",p,[t(k,{"icon-name":"graduationCap"})]),l(" "+r(_.$t("Tutorial")),1)],void 0),_:1},8,["title","class","onClick"]),t(I,{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(),a("div",f,[t(D,{animated:!0,rows:10})])):(e(),a("div",{key:0,class:"doc_read",innerHTML:g.doc.content},null,8,u))],void 0),_:1},8,["modelValue","title","size","direction"])])}]]);export{v as I};
