// import { DatePicker, InputGroup, TimePicker } from '@dvn/alaca';
// import { ConditionalComparisonRule, RuleType } from '../../../../atama-web/src/models';
import { Component, Prop } from '@stencil/core';
export class DvnFieldInputDate {
  render() {
    return 'Not Implemented';
  }
  static get is() { return "dvn-field-input-date"; }
  static get properties() { return {
    "disabled": {
      "type": "boolean",
      "mutable": false,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": true,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "disabled",
      "reflect": false
    },
    "field": {
      "type": "unknown",
      "mutable": false,
      "complexType": {
        "original": "DateField",
        "resolved": "DateField",
        "references": {
          "DateField": {
            "location": "import",
            "path": "../date"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      }
    },
    "errors": {
      "type": "unknown",
      "mutable": false,
      "complexType": {
        "original": "any[]",
        "resolved": "any[]",
        "references": {}
      },
      "required": false,
      "optional": true,
      "docs": {
        "tags": [],
        "text": ""
      }
    },
    "value": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": true,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "value",
      "reflect": false
    }
  }; }
}
/*

export interface IProps extends BaseInputProps<DateInput, Date> {
}

export class InputDate extends React.Component<IProps> {

  constructor(props: IProps) {
    super(props);

    this.state = {
      value: props.value,
    };
  }

  public render() {
    const { disabled, field, errors, value } = this.props;
    const hasError = errors && errors.length > 0;
    const error = hasError ? errors![0] : undefined;

    if (field.preview) {
      return (
        <div>
          {(field.inputType === 'date' || field.inputType === 'dateTime') && value &&
          value.toDateString()
          }

          <div>
            {error}
          </div>
        </div>
      );
    }

    return (
      <InputGroup>
        {(field.inputType === 'date' || field.inputType === 'dateTime') &&
        <DatePicker
          id={`${field.id}-date`}
          disabled={disabled}
          format={field.dateFormat}
          onChange={this.onDateChange}
          placeholder={field.placeholder}
          value={value}
          width={field.inputType === 'dateTime' ? 120 : 240}
        />
        }

        {(field.inputType === 'time' || field.inputType === 'dateTime') &&
        <TimePicker
          disabled={disabled}
          // format={field.timeFormat}
          onChange={this.onTimeChange}
          value={value}
          width={field.inputType === 'dateTime' ? 120 : 240}
        />
        }
      </InputGroup>
    );
  }

  private onDateChange = (date: Date) => {
    const { value = new Date() } = this.props;

    date.setHours(value.getHours());
    date.setMinutes(value.getMinutes());
    date.setSeconds(value.getSeconds());
    date.setMilliseconds(value.getMilliseconds());

    this.props.onChange(date);
  };

  private onTimeChange = (time: Date) => {
    const { value = new Date() } = this.props;

    time.setFullYear(value.getFullYear(), value.getMonth(), value.getDate());

    this.props.onChange(time);
  };
}*/
