import{c as s,u as k,g as $,e as M,h as P,i as R,k as S,j as y,L as B,T as F,z as V}from"./index-Bsr9DJ3G.js";import{r as a}from"./vendor-DJo4KD8w.js";import{T as j}from"./ToolbarPanels-CPoZvoTB.js";import{u as z}from"./i18n-BbpF47i1.js";import"./routing-DCIgrT7s.js";import"./XMarkIcon-KMKD47CF.js";function _(){var c;const{t:h}=z(),e=(o,n)=>h(`ModerationLinkedData.${o}`,n),r=(c=s(k().activeSession$))==null?void 0:c.client,u=$(),t=M(()=>V(u,o=>r.admin.exportKnowledgeBase(o),(o,n)=>r.admin.importKnowledgeBase(o,n==null?void 0:n.onProgress))),d=s(t.browse.activePanel$)??null,b=s(t.selectedFile$)??null,g=s(t.preview$)??null,x=s(t.isExporting$)??!1,v=s(t.isImporting$)??!1,f=s(t.importPhase$)??null,C=s(t.importMessage$),E=s(t.importResult$),{theme:w,setTheme:l}=P(),{showLineNumbers:I,toggleLineNumbers:p}=R();S({"settings:theme-changed":a.useCallback(({theme:o})=>l(o),[l]),"settings:line-numbers-toggled":a.useCallback(()=>p(),[p])});const L=a.useCallback(async()=>{const{blob:o,filename:n}=await t.doExport(),m=URL.createObjectURL(o),i=document.createElement("a");i.href=m,i.download=n,i.click(),URL.revokeObjectURL(m)},[t]),T=a.useCallback(async()=>{await t.doImport()},[t]);return y.jsx(B,{onExport:L,isExporting:x,onFileSelected:t.selectFile,onImport:T,onCancelImport:t.cancelImport,selectedFile:b,preview:g,isImporting:v,importPhase:f,importMessage:C,importResult:E,theme:w,showLineNumbers:I,activePanel:d,translations:{title:e("title"),subtitle:e("subtitle"),export:{title:e("exportTitle"),description:e("exportDescription"),exportButton:e("exportButton"),exporting:e("exporting")},import:{title:e("importTitle"),description:e("importDescription"),dropzoneLabel:e("dropzoneLabel"),dropzoneActive:e("dropzoneActive"),detectedFormat:e("detectedFormat"),statsPreview:e("statsPreview"),importButton:e("importButton"),importing:e("importing"),importConfirmTitle:e("importConfirmTitle"),importConfirmMessage:e("importConfirmMessage"),confirmImport:e("confirmImport"),cancelImport:e("cancelImport")},progress:{phaseStarted:e("phaseStarted"),phaseEntityTypes:e("phaseEntityTypes"),phaseResources:e("phaseResources"),phaseAnnotations:e("phaseAnnotations"),phaseComplete:e("phaseComplete"),phaseError:e("phaseError"),hashChainValid:e("hashChainValid"),hashChainInvalid:e("hashChainInvalid"),streams:e("streams"),events:e("events"),blobs:e("blobs")}},ToolbarPanels:j,Toolbar:F})}export{_ as default};
//# sourceMappingURL=client-CCxdaxo8.js.map
