import * as React from "react"; import { ITask } from "./models"; import { TaskStatusBasedType } from "./TaskChannelDefinition"; /** * @classdesc Helper for task channel definitions * @hideconstructor * @category Helpers */ export declare class TaskChannelHelper { /** * Gets template code from task status based template holder * * @static * @param {ITask} task task * @param {TaskStatusBasedType} templateHolder task status based template * @param {React.ComponentType} componentType component that is calling the method * @returns {string} template code * @throws {Error} if templateHolder argument is not provided * @example * import { TaskChannelHelper, Badge } from "@twilio/flex-ui"; * const template = TaskChannelHelper.getTemplateForStatus(myTask, customTemplateHolder, Badge); */ static getTemplateForStatus(task: ITask, templateHolder: TaskStatusBasedType | undefined, componentType: React.ComponentType): string; /** * Gets icon from task status based icon holder * * @static * @param {ITask} task task * @param {TaskStatusBasedType} iconHolder task status based icon * @param {boolean} [byState=false] If icon is based on state * @param {boolean} [bold=false] If icon is bold * @param {React.ComponentType} componentType component that is calling the method * @returns {(string | React.ReactNode)} icon code as string or ReactNode to be rendered as icon * @throws {Error} if iconHolder argument is not provided * @example * import { TaskChannelHelper, Badge } from "@twilio/flex-ui"; * const Icon = TaskChannelHelper.getIcon(myTask, customIconHolder, Badge); */ static getIcon(task: ITask, iconHolder: TaskStatusBasedType, componentType: React.ComponentType, byState?: boolean, bold?: boolean): string | React.ReactNode; /** * Gets color from task status based color holder * * @static * @param {ITask} task task * @param {TaskStatusBasedType} colorHolder task status based template * @param {React.ComponentType} componentType component that is calling the method * @returns {string} color code * @throws {Error} if colorHolder argument is not provided * @example * import { TaskChannelHelper, Badge } from "@twilio/flex-ui"; * const badgeColor = TaskChannelHelper.getColor(myTask, customColorHolder, Badge); */ static getColor(task: ITask, colorHolder: TaskStatusBasedType, componentType: React.ComponentType): string; }