{"version":3,"sources":["../../src/metadata/index.ts"],"names":[],"mappings":";;;;AAQO,SAAS,WAAW,MAAgB,EAAA;AAC1C,EAAA,OAAO,CAAG,EAAA,MAAA,CAAO,GAAG,CAAA,CAAA,EAAI,OAAO,IAAI,CAAA,CAAA,CAAA;AACpC,CAAA;AAEO,SAAS,cAAA,CAAe,QAAgB,QAA6B,EAAA;AAE3E,EAAA,QAAA,CAAS,UAAW,CAAA,MAAM,CAAC,CAAA,GAAI,OAAO,QAAe,CAAA,CAAA;AACtD","file":"index.cjs","sourcesContent":["import type { Action } from \"@rss3/api-core\";\n\nimport type { MetadataDoc } from \"./doc.js\";\n\ntype Handlers = {\n\t[K in keyof MetadataDoc]: (metadata: MetadataDoc[K][\"ref\"]) => void;\n};\n\nexport function getTagType(action: Action) {\n\treturn `${action.tag}-${action.type}` as keyof Handlers;\n}\n\nexport function handleMetadata(action: Action, handlers: Partial<Handlers>) {\n\t// biome-ignore lint/suspicious/noExplicitAny: Use of any is necessary here\n\thandlers[getTagType(action)]?.(action.metadata as any);\n}\n\nexport { renderItemActionToHTML } from \"./parser.js\";\n"]}