import{dq as l,p as y,dr as g,l as d,az as f,c8 as m,bt as u,T as b}from"./index-_eM6l4Nf.js";import{c}from"./complement-CE-nEpWn.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"}),B=o=>o.reduce((e,{name:s,description:a,required:i,type:r,enum:t})=>{if(s==="")return e;if(r.includes("Array")){const n=r.slice(r.lastIndexOf(" ")+1);e.properties[s]={description:a,type:"array",items:{type:p.getByKey(n)}}}else e.properties[s]={type:p.getByKey(r),description:a??"",...r==="String"?{enum:t!=null&&t.length?t:void 0}:{}};return i&&e.required.push(s),e},{properties:{},required:[]}),T=o=>Object.entries(o.properties).map(([e,{description:s,type:a,items:i,enum:r}])=>{var t;return{name:e,type:p.getByValue(a+(i?i.type:"")),...a==="string"?{enum:r!=null&&r.length?r:void 0}:{},required:(t=o.required)==null?void 0:t.includes(e),description:s??""}}),h=y(b("properties"),u,f(m(["type","description","items","enum"])),g(c(d)));export{B as a,h as j,T as m,p};
