import {z}from'zod';var d=Object.defineProperty;var r=(e,t)=>d(e,"name",{value:t,configurable:true});var n={react:"react",vue:"vue","web-components":"web-components",twig:"twig",hbs:"hbs",angular:"angular",html:"html",ios:"ios",android:"android"},I=z.strictObject({path:z.string().describe("Can contain glob patterns, relative paths, absolute paths, package paths, or package sub-paths"),filter:z.custom(e=>typeof e=="function").optional().describe("A function that takes a path and returns a boolean")});function u(e){return "codeSrcPath"in e}r(u,"isTemplateInfoWithCodeSrcPath");function p(e){switch(e.rendererId){case "angular":case "react":return `${e.rendererId}---${e.codeSrcPath}---${e.exportName||"default"}`;case "web-components":return `${e.rendererId}---${e.elementName}`;case "twig":return `${e.rendererId}---${e.namespacePath}`;case "vue":case "hbs":case "html":return `${e.rendererId}---${e.codeSrcPath}`;case "ios":return `${e.rendererId}---${e.moduleName}---${e.symbolName}`;case "android":return `${e.rendererId}---${e.packageName}---${e.componentName}`;default:{throw new Error(`Invalid template info: ${JSON.stringify(e)}`)}}}r(p,"createTemplateInfoId");function g(e){return {...e,id:p(e)}}r(g,"addIdToTemplateInfo");function T({rendererId:e,alias:t,path:a}){return (()=>{switch(e){case "react":case "angular":return {rendererId:e,codeSrcPath:a,exportName:t||"default"};case "vue":case "hbs":case "html":return {rendererId:e,codeSrcPath:a};case "twig":return {rendererId:e,namespacePath:t};case "web-components":return {rendererId:e,elementName:t};case "ios":return {rendererId:e,moduleName:a,symbolName:t};case "android":return {rendererId:e,packageName:a,componentName:t};default:{throw new Error(`Invalid renderer ID: ${e}`)}}})()}r(T,"normalizeTemplateInfo");function f(e){switch(e.rendererId){case "react":case "angular":return {path:e.codeSrcPath,alias:e.exportName};case "hbs":case "html":case "vue":return {path:e.codeSrcPath};case "twig":return {alias:e.namespacePath};case "web-components":return {alias:e.elementName};case "ios":return {path:e.moduleName,alias:e.symbolName};case "android":return {path:e.packageName,alias:e.componentName};default:{throw new Error(`Invalid template info: ${JSON.stringify(e)}`)}}}r(f,"convertTemplateInfoToOldWay");var S={id:n.ios,title:"iOS",aliasUse:"required",aliasTitle:"Symbol Name",aliasDescription:"The synchronized name of the iOS symbol.",enableDataDemos:true,enableTemplateDemos:false,hasTemplateImgSupport:true,hasSlotsSupport:false,hasSlotOptionsSupport:false,hasInferSpecSupport:true,hasTemplateSuggestionsSupport:true},P={id:n.android,title:"Android",aliasUse:"required",aliasTitle:"Component Name",aliasDescription:"The synchronized name of the Android component.",enableDataDemos:true,enableTemplateDemos:false,hasSlotsSupport:false,hasSlotOptionsSupport:false,hasTemplateImgSupport:true,hasInferSpecSupport:true,hasTemplateSuggestionsSupport:true},s=[n.ios,n.android];function i(e){return s.includes(e)}r(i,"isRendererIdForNativeMobile");function R(e){return i(e.rendererId)}r(R,"isTemplateInfoForNativeMobile");export{I as CodeSrcUserConfigSchema,g as addIdToTemplateInfo,f as convertTemplateInfoToOldWay,p as createTemplateInfoId,i as isRendererIdForNativeMobile,R as isTemplateInfoForNativeMobile,u as isTemplateInfoWithCodeSrcPath,P as metaForAndroidRenderer,S as metaForIosRenderer,T as normalizeTemplateInfo,n as rendererIds,s as rendererIdsForNativeMobile};//# sourceMappingURL=renderers.mjs.map
//# sourceMappingURL=renderers.mjs.map