import {z}from'zod';var p=Object.defineProperty;var r=(e,t)=>p(e,"name",{value:t,configurable:true});var i={react:"react",vue:"vue","web-components":"web-components",twig:"twig",hbs:"hbs",angular:"angular",html:"html"},m=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 h(e){return "codeSrcPath"in e}r(h,"isTemplateInfoWithCodeSrcPath");function d(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}`;default:{throw new Error(`Invalid template info: ${JSON.stringify(e)}`)}}}r(d,"createTemplateInfoId");function I(e){return {...e,id:d(e)}}r(I,"addIdToTemplateInfo");function g({rendererId:e,alias:t,path:n}){return (()=>{switch(e){case "react":case "angular":return {rendererId:e,codeSrcPath:n,exportName:t||"default"};case "vue":case "hbs":case "html":return {rendererId:e,codeSrcPath:n};case "twig":return {rendererId:e,namespacePath:t};case "web-components":return {rendererId:e,elementName:t};default:{throw new Error(`Invalid renderer ID: ${e}`)}}})()}r(g,"normalizeTemplateInfo");function u(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};default:{throw new Error(`Invalid template info: ${JSON.stringify(e)}`)}}}r(u,"convertTemplateInfoToOldWay");export{m as CodeSrcUserConfigSchema,I as addIdToTemplateInfo,u as convertTemplateInfoToOldWay,d as createTemplateInfoId,h as isTemplateInfoWithCodeSrcPath,g as normalizeTemplateInfo,i as rendererIds};//# sourceMappingURL=renderers.mjs.map
//# sourceMappingURL=renderers.mjs.map