import { ControlResponseBuilder } from '../..'; import { ControlInput } from '../../controls/ControlInput'; import { AplContent, ListAPLComponentProps, ListControl, ListControlRenderedItem } from './ListControl'; export declare namespace ListControlAPLPropsBuiltIns { interface DefaultSelectValueAPLProps { /** * Default: 'Please select' */ title?: string; /** * Default: '' */ subtitle?: string; /** * Function that maps the ListControlState.value to rendered value that * will be presented to the user as a list. * * Default: returns the value unchanged. */ valueRenderer: (value: string, input: ControlInput) => ListControlRenderedItem; } function defaultSelectValueAPLContent(props: DefaultSelectValueAPLProps): (control: ListControl, input: ControlInput) => AplContent; /** * The APL dataSource to use when requesting a value * * Default: A TextListLayout data source to bind to an APL document. * See * https://developer.amazon.com/en-US/docs/alexa/alexa-presentation-language/apl-data-source.html */ function listDataSourceGenerator(control: ListControl, input: ControlInput, contentProps: DefaultSelectValueAPLProps): { general: { headerTitle: string | undefined; headerSubtitle: string; controlId: string; }; choices: { listItems: { primaryText: string; }[]; }; }; /** * The APL document to use when requesting a value * * Default: A TextListLayout document with scrollable and clickable list. * See * https://developer.amazon.com/en-US/docs/alexa/alexa-presentation-language/apl-alexa-text-list-layout.html */ function listDocumentGenerator(control: ListControl, input: ControlInput): { type: string; version: string; import: { name: string; version: string; }[]; mainTemplate: { parameters: string[]; items: { type: string; theme: string; headerTitle: string; headerDivider: boolean; backgroundColor: string; touchForward: boolean; primaryAction: { type: string; arguments: string[]; }; listItems: string; }[]; }; }; } /** * Namespace which define built-in renderers for APL Component Mode. */ export declare namespace ListControlComponentAPLBuiltIns { /** * Function which returns an APL component using ImageListLayout. * * @param control - ListControl * @param props - Control context props e.g valueRenderer * @param input - Input * @param resultBuilder - Result builder */ function renderImageList(control: ListControl, props: ListAPLComponentProps, input: ControlInput, resultBuilder: ControlResponseBuilder): { type: string; controlId: string; listItems: { primaryText: string | undefined; secondaryText: string; imageSource: string; fontColor: string; backgroundColor: string; }[]; }; /** * Function which returns an APL component using TextListLayout. * * @param control - ListControl * @param props - Control context props e.g valueRenderer * @param input - Input * @param resultBuilder - Result builder */ function renderTextList(control: ListControl, props: ListAPLComponentProps, input: ControlInput, resultBuilder: ControlResponseBuilder): { type: string; controlId: string; listItems: { primaryText: string | undefined; }[]; }; /** * Defines TextListRenderer for APLComponentMode. */ class TextListRenderer { /** * Provides a default implementation of textList with default props. * * @param control - ListControl * @param defaultProps - props * @param input - Input * @param resultBuilder - Result builder */ static default: (control: ListControl, defaultProps: ListAPLComponentProps, input: ControlInput, resultBuilder: ControlResponseBuilder) => { type: string; controlId: string; listItems: { primaryText: string | undefined; }[]; }; /** * Provides customization over `renderTextList()` arguments where the input * props overrides the defaults. * * @param props - props */ static of(props: ListAPLComponentProps): (control: ListControl, defaultProps: ListAPLComponentProps, input: ControlInput, resultBuilder: ControlResponseBuilder) => { type: string; controlId: string; listItems: { primaryText: string | undefined; }[]; }; } /** * Defines ImageListRenderer for APLComponentMode. */ class ImageListRenderer { /** * Provides a default implementation of imageList with default props. * * @param control - ListControl * @param defaultProps - props * @param input - Input * @param resultBuilder - Result builder */ static default: (control: ListControl, defaultProps: ListAPLComponentProps, input: ControlInput, resultBuilder: ControlResponseBuilder) => { type: string; controlId: string; listItems: { primaryText: string | undefined; secondaryText: string; imageSource: string; fontColor: string; backgroundColor: string; }[]; }; /** * Provides customization over `renderImageList()` arguments where the input * props overrides the defaults. * * @param props - props */ static of(props: ListAPLComponentProps): (control: ListControl, defaultProps: ListAPLComponentProps, input: ControlInput, resultBuilder: ControlResponseBuilder) => { type: string; controlId: string; listItems: { primaryText: string | undefined; secondaryText: string; imageSource: string; fontColor: string; backgroundColor: string; }[]; }; } } //# sourceMappingURL=ListControlAPL.d.ts.map