export declare const source = "/* eslint-disable import/prefer-default-export, import/no-cycle */\nimport { Type, TypeName, lookupType } from \"./internal\";\n\nexport type FieldMetadataType = TypeName | \"SystemString\" | \"SystemBoolean\" | \"SystemNumber\";\nconst systemTypes = [\"SystemString\", \"SystemBoolean\", \"SystemNumber\"];\n\nexport class FieldMetadata {\n constructor(\n public readonly fieldName: string,\n public readonly fieldTypeNames: ReadonlyArray,\n public readonly isArray: boolean\n ) {}\n\n get isChoice(): boolean {\n return this.fieldTypeNames.length > 1;\n }\n\n get isSystemType(): boolean {\n return this.isChoice && systemTypes.indexOf(this.fieldTypeNames[0]) > 0;\n }\n\n get choiceTypes(): Array {\n if (this.isChoice) {\n return this.fieldTypeNames.map((typeName) => {\n const typeRef = lookupType(typeName);\n if (!typeRef) {\n throw new Error(`Cannot find type ${typeName}`);\n }\n return typeRef;\n });\n }\n return [];\n }\n}\n/* eslint-enable import/prefer-default-export, import/no-cycle */\n"; declare const _default: HandlebarsTemplateDelegate; export default _default; //# sourceMappingURL=FieldMetadataTemplate.d.ts.map