import h from"./SchemaTabs-B-YYDirE.js";import{u}from"./store-7aRonVWq.js";import"./EditableInput-DQlgWBJl.js";import{_}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./vuedraggable.umd-CrsnNXKf.js";import{g as o,A as n,J as a,j as s,P as c,t as i,i as f,O as m}from"./index-DOFLUERq.js";import"./SchemaSections-BAEJPWaR.js";import{u as w}from"./index-CRx3oDcD.js";import{h as S}from"./index-DuPUrsw1.js";import"./_commonjsHelpers-CE1G-McA.js";const g={class:"schema-canvas"},k={class:"schema-header"},y={class:"schema-actions"},C={class:"schema-content"},b={key:0,class:"schema-preview"},B={__name:"SchemaCanvas",setup(E){const e=u(),{Backspace:p}=w();S(p,t=>{t&&e.selectedField&&e.notUsingInput&&d(e.selectedField)});function d(t){e.removeProperty(t)}function l(){e.updateSchema();const t=new CustomEvent("schema-save",{detail:{schemaData:e.schema}});document.dispatchEvent(t)}return(t,r)=>(o(),n("div",g,[a("div",k,[a("div",y,[a("button",{class:"preview-btn",onClick:r[0]||(r[0]=(...v)=>s(e).togglePreview&&s(e).togglePreview(...v))},c(s(e).preview?s(i)("Edit"):s(i)("Preview")),1),a("button",{class:"save-btn",onClick:l},c(s(i)("Save")),1)])]),s(e).preview?m("",!0):(o(),f(h,{key:0})),a("div",C,[s(e).preview?(o(),n("div",b,[a("pre",null,c(JSON.stringify(s(e).schema,null,2)),1)])):m("",!0)])]))}},A=_(B,[["__scopeId","data-v-a6a159d7"]]);export{A as default};
