import{r as i,j as r,S as o,h as l,H as m}from"./vendor-ClLR6ncd.js";import{b as c,S as u}from"./model-Cn8i8hm_.js";import{E as d}from"./Messages-BRmQDxrZ.js";import"./ui-DKzyPIqx.js";import"./lodash-ZyeDnt0e.js";import"./index-OtVJl4GC.js";import"./model-Dfrorm_S.js";import"./ui-BOPU8Yl4.js";import"./index-CQ79H_Lz.js";import"./model-AmaTU-rL.js";import"./useNamespaces-B-2wwTCG.js";import"./model-DgFcCvKB.js";import"./WithMeasure-BDk9QPMF.js";import"./Autocomplete-Cjt7Q9VV.js";import"./Chip-DoCs8Smb.js";import"./highlightSearch-BTHB3jgf.js";import"./TableRow-CGDSOtFZ.js";import"./TableSortLabel-BJFq2axQ.js";import"./Box-Co2WcNPC.js";import"./TypographyWithTooltip-BFAG3Va9.js";import"./Link-BLwKPJFF.js";function B(){const[t,s]=i.useState({dirty:!1,value:"",fullUri:!1}),n=i.useMemo(()=>{const e=t.value.trim();if(!e)return!0;try{return JSON.parse(e),!1}catch{return!0}},[t.value]),p=i.useCallback(e=>{s({dirty:!1,value:e,fullUri:!1})},[]),a=c(void 0,t.value,"..");return r.jsxs(o,{spacing:2,sx:{flexGrow:1},children:[r.jsx(o,{direction:"row",spacing:2,alignItems:"center",children:r.jsx(l,{noWrap:!0,variant:"h4",children:"Create new SHACL Shape"})}),r.jsx(u,{value:t.value,onChange:p}),r.jsx(d,{error:a.error}),r.jsx(o,{direction:"row",spacing:2,children:r.jsx(m,{variant:"contained",disabled:a.isLoading||n,onClick:a.mutate,children:"Save"})})]})}export{B as default};
