Component({
  props: {
    focus: false,
    value: '',
    placeholder: '',
    focusClickSpm: '',
    clearClickSpm: '',
    cancelClickSpm: '',
    onInput: () => {},
    onFocus: () => {},
    onCancel: () => {},
    onClear: () => {}
  },

  didMount() {
    const {
      onInput
    } = this.props;

    if (onInput) {// this.inputDebounce = (_common_utils_lodash_1__.debounce)(onInput, (_common_constants_2__.DEBOUNCE_DELAY));
    }
  },

  methods: {
    onInput(value) {
      this.inputDebounce && this.inputDebounce(value);
    },

    onFocus() {
      const {
        onFocus,
        focusClickSpm
      } = this.props;
      focusClickSpm && this.$spm.click(focusClickSpm);
      onFocus && onFocus();
    },

    onCancel() {
      const {
        onCancel,
        cancelClickSpm
      } = this.props;
      cancelClickSpm && this.$spm.click(cancelClickSpm);
      onCancel && onCancel();
    },

    onClear(value) {
      const {
        onInput,
        onClear,
        clearClickSpm
      } = this.props;
      clearClickSpm && this.$spm.click(clearClickSpm);
      onInput && onInput(value);
      onClear && onClear();
    }

  }
});