Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./transform-CgYq-aI0.cjs`);var t=class{constructor(e){this.metadataCollection=e}componentNames(){return Object.keys(this.metadataCollection)}getComponent(e){let t=this.metadataCollection[e];return t?new n(t):null}},n=class{constructor(e){this.metadata=e}getProp(e){return this.metadata.props[e]??i[e]}getAttr(t){if(e.n.test(t)){let n=e.r(t),r=this.metadata.events?.[n];if(r)return r}return this.metadata.props?.[t]||this.metadata.apis?.[t]||r(t)||i[t]}getAttrForKind({name:e,kind:t}){switch(t){case`api`:return this.metadata.apis[e];case`event`:return this.metadata.events[e];case`prop`:return this.metadata.props[e];case`implicit`:return i[e];case`layout`:return r(e)}}getAllAttributes(){let t=[];for(let e of Object.keys(this.metadata.props??{}))t.push({name:e,kind:`prop`});for(let e of Object.keys(this.metadata.events??{}))t.push({name:e,kind:`event`});for(let e of Object.keys(this.metadata.apis??{}))t.push({name:e,kind:`api`});for(let n of e.y)t.push({name:n,kind:`layout`});for(let e of Object.keys(i))t.push({name:e,kind:`implicit`});return t}getEvent(e){return this.metadata.events?.[e]}getApi(e){return this.metadata.apis?.[e]}get events(){return this.metadata.events}get apis(){return this.metadata.apis}get contextVars(){return this.metadata.contextVars}get allowArbitraryProps(){return this.metadata.allowArbitraryProps}get shortDescription(){return this.metadata.shortDescription}getMetadata(){return this.metadata}};function r(t){let n={description:`Layout property. Not yet documented`};if(e.y.includes(t))return n;for(let r of e.W){let i=`-`+r.value;if(t.endsWith(i)){let r=t.slice(0,-i.length);if(e.y.includes(r))return n}}return null}var i={inspect:{description:`Determines whether the component can be inspected or not`,defaultValue:!1,valueType:`boolean`},data:{description:`Specifies the data source for a component. Can be a URL string (fetched automatically), a DataSource or an expression to evaluate. Changes to this property trigger UI updates once data is loaded.`},when:{description:`Specifies a condition that must be met for the component to be displayed`,defaultValue:!0,valueType:`boolean`}};function a(e){return`on`+e[0].toUpperCase()+e.substring(1)}exports.ComponentMetadataProvider=n,exports.MetadataProvider=t,exports.addOnPrefix=a;
//# sourceMappingURL=metadata-utils.cjs.map