import { GenericDataField, GenericDataSchema, StudioFormFields } from '@aws-amplify/codegen-ui/lib/types'; import { Statement, Expression, Identifier, ParameterDeclaration } from 'typescript'; export declare const lowerCaseFirst: (input: string) => string; export declare const createUniqueName: (name: string, isNameUsed: (input: string) => boolean) => string; export declare const capitalizeFirstLetter: (val: string) => string; export declare const getSetNameIdentifier: (value: string) => Identifier; export declare const getModelNameProp: (value: string) => string; /** * const [name, setName] = React.useState({default_expression}); * * name is the value we are looking to set * defaultValue is is the value to set for the useState * @param name * @param defaultValue * @returns */ export declare const buildUseStateExpression: (name: string, defaultValue: Expression) => Statement; export declare const buildUseRefExpression: (name: string, defaultValue?: Expression | undefined) => Statement; /** * Create statement to declare and initialized a const. * * const name = value; * @param name * @param value * @returns */ export declare const buildInitConstVariableExpression: (name: string, value: Expression) => Statement; /** * Create statement to declare an arrow function to a const. * * @example * ``` * const variableName = (parameterDeclaration) => { * functionName(expression); * }; * ``` */ export declare const buildArrowFunctionStatement: (variableName: string, functionName: string, expression: Expression, parameterDeclarations?: ParameterDeclaration[] | undefined) => Statement; export declare function fieldNeedsRelationshipLoadedForCollection(field: GenericDataField, dataSchema: GenericDataSchema): boolean; export declare function modelNeedsRelationshipsLoadedForCollection(modelName: string, dataSchema?: GenericDataSchema): boolean; export declare function isAliased(componentType: string): boolean; export declare function removeAlias(aliasString: string): string; export declare function getControlledComponentDefaultValue(fields: StudioFormFields, componentType: string, name: string): string | null;