import {IBaseForm} from '../baseForm' import {paramsInterfaceValidKey} from '../../../script/index' export interface SwitchInterface extends IBaseForm { tipDisabled?: Function tipContent?: Function defaultVal?: Function activeText?: string inactiveText?: string activeValue?: boolean | string | number inactiveValue?: boolean | string | number activeColor?: string inactiveColor?: string } export class SwitchConfig implements SwitchInterface { type = 'infoSwitch' model = '' label = '' activeText = '' inactiveText = '' activeValue: boolean | string | number = true inactiveValue: boolean | string | number = false activeColor = '' inactiveColor = '' tipDisabled = (): boolean => true tipContent = (): string => '' methods = (): void => { } defaultVal = (): boolean => false disabled = (): boolean => false constructor (params: SwitchInterface) { paramsInterfaceValidKey(this, params) } }