import { r as registerInstance, h, H as Host } from './index-acdc1ac0.js';

const dvnTimePickerCss = "dvn-time-picker{display:block}";

function formatTwoDigits(value) {
  return value < 10 ? '0' + value : '' + value;
}
const DvnTimePicker = class {
  constructor(hostRef) {
    registerInstance(this, hostRef);
    this.hour = 9;
    this.minute = 0;
  }
  componentWillLoad() {
    this.hours = Array.apply(null, Array(24)).map((_, i) => i);
  }
  render() {
    const { hour, minute } = this;
    return (h(Host, null, h("dvn-input-group", { leaned: true }, h("dvn-select", { width: "50px", hideCaret: true, hideCheck: true, hideScrollbar: true, value: `${hour}` }, h("dvn-select-option", null, "HH"), this.hours.map(hour => (h("dvn-select-option", { value: `${hour}` }, formatTwoDigits(hour))))), h("dvn-select", { width: "50px", hideCaret: true, hideCheck: true, hideScrollbar: true, value: `${minute}` }, h("dvn-select-option", null, "mm"), h("dvn-select-option", { value: "0" }, "00"), h("dvn-select-option", { value: "15" }, "15"), h("dvn-select-option", { value: "30" }, "30"), h("dvn-select-option", { value: "45" }, "45")))));
  }
};
DvnTimePicker.style = dvnTimePickerCss;

export { DvnTimePicker as dvn_time_picker };
