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