import{d0 as l,h as y,q as g,m,cO as d,ac as f,p as u}from"./index-BKr2rJhV.js";import{a as c}from"./any-Db6pVWyk.js";import{c as b}from"./complement-DGLuzEAM.js";const p=l({String:"string",Integer:"integer",Float:"number",Boolean:"boolean","Array of Float":"arraynumber","Array of Integer":"arrayinteger","Array of String":"arraystring","Array of Boolean":"arrayboolean"}),h=s=>s.reduce((e,{name:a,description:o,required:i,type:r,enum:t})=>{if(a==="")return e;if(r.includes("Array")){const n=r.slice(r.lastIndexOf(" ")+1);e.properties[a]={description:o,type:"array",items:{type:p.getByKey(n)}}}else e.properties[a]={type:p.getByKey(r),description:o??"",...r==="String"?{enum:t!=null&&t.length?t:void 0}:{}};return i&&e.required.push(a),e},{properties:{},required:[]}),j=s=>Object.entries(s.properties).map(([e,{description:a,type:o,items:i,enum:r}])=>{var t;return{name:e,type:p.getByValue(o+(i?i.type:"")),...o==="string"?{enum:r!=null&&r.length?r:void 0}:{},required:(t=s.required)==null?void 0:t.includes(e),description:a??""}}),v=y(u("properties"),f,m(d(["type","description","items","enum"])),c(b(g)));export{h as a,v as j,j as m,p};
