import { ComponentClass } from 'react'

import CtsComponent from './base'

export interface CtsFloatInputProps extends CtsComponent {
  /**
   * 浮动弹层的显示与隐藏
   * @default false
   */
  isOpened: boolean
  /**
   * 输入框的默认值
   */
  value: string
  /**
   * 标题
   */
  title: string
  /**
   * 输入框类型
   * @description 可选择的值 'text', 'number', 'password', 'phone', 'idcard', 'digit'
   * @type {('text'|'number'|'password'|'phone'|'idcard'|'digit')}
   * @default 'text'
   */
  type?: 'text' | 'number' | 'password' | 'phone' | 'idcard' | 'digit'
  /**
   * 输入框标题
   */
  name: string
  /**
   * 输入框placeholder
   */
  placeholder?: string
  /**
   * 输入框的最大长度
   * @default 140
   */
  maxLength?: number
  /**
   * 弹层被关闭时事件
   */
  onCancel: any
  /**
   * 确认浮动弹层事件
   */
  onConfirm: any
}

export interface CtsFloatInputState {
  /**
   * 输入框的值
   */
  value: string
}

declare const CtsFloatInput: ComponentClass<CtsFloatInputProps>

export default CtsFloatInput