export const id=4110;export const ids=[4110];export const modules={9655:(e,t,a)=>{a.d(t,{J:()=>l});var i=a(5081),d=a(6415);const l=(0,i.A)((e=>{if(e.time_format===d.Hg.language||e.time_format===d.Hg.system){const t=e.time_format===d.Hg.language?e.language:void 0;return new Date("January 1, 2023 22:00:00").toLocaleString(t).includes("10")}return e.time_format===d.Hg.am_pm}))},2560:(e,t,a)=>{var i=a(5461),d=(a(3981),a(8597)),l=a(196),n=a(9278),r=a(3167),s=a(4517);a(6334),a(6396),a(3689);(0,i.A)([(0,l.EM)("ha-base-time-input")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,l.MZ)()],key:"label",value:void 0},{kind:"field",decorators:[(0,l.MZ)()],key:"helper",value:void 0},{kind:"field",decorators:[(0,l.MZ)({type:Boolean})],key:"autoValidate",value(){return!1}},{kind:"field",decorators:[(0,l.MZ)({type:Boolean})],key:"required",value(){return!1}},{kind:"field",decorators:[(0,l.MZ)({type:Number})],key:"format",value(){return 12}},{kind:"field",decorators:[(0,l.MZ)({type:Boolean})],key:"disabled",value(){return!1}},{kind:"field",decorators:[(0,l.MZ)({type:Number})],key:"days",value(){return 0}},{kind:"field",decorators:[(0,l.MZ)({type:Number})],key:"hours",value(){return 0}},{kind:"field",decorators:[(0,l.MZ)({type:Number})],key:"minutes",value(){return 0}},{kind:"field",decorators:[(0,l.MZ)({type:Number})],key:"seconds",value(){return 0}},{kind:"field",decorators:[(0,l.MZ)({type:Number})],key:"milliseconds",value(){return 0}},{kind:"field",decorators:[(0,l.MZ)()],key:"dayLabel",value(){return""}},{kind:"field",decorators:[(0,l.MZ)()],key:"hourLabel",value(){return""}},{kind:"field",decorators:[(0,l.MZ)()],key:"minLabel",value(){return""}},{kind:"field",decorators:[(0,l.MZ)()],key:"secLabel",value(){return""}},{kind:"field",decorators:[(0,l.MZ)()],key:"millisecLabel",value(){return""}},{kind:"field",decorators:[(0,l.MZ)({type:Boolean})],key:"enableSecond",value(){return!1}},{kind:"field",decorators:[(0,l.MZ)({type:Boolean})],key:"enableMillisecond",value(){return!1}},{kind:"field",decorators:[(0,l.MZ)({type:Boolean})],key:"enableDay",value(){return!1}},{kind:"field",decorators:[(0,l.MZ)({type:Boolean})],key:"noHoursLimit",value(){return!1}},{kind:"field",decorators:[(0,l.MZ)()],key:"amPm",value(){return"AM"}},{kind:"field",decorators:[(0,l.MZ)({type:Boolean,reflect:!0})],key:"clearable",value:void 0},{kind:"method",key:"render",value:function(){return d.qy`
      ${this.label?d.qy`<label>${this.label}${this.required?" *":""}</label>`:""}
      <div class="time-input-wrap-wrap">
        <div class="time-input-wrap">
          ${this.enableDay?d.qy`
                <ha-textfield
                  id="day"
                  type="number"
                  inputmode="numeric"
                  .value=${this.days.toFixed()}
                  .label=${this.dayLabel}
                  name="days"
                  @change=${this._valueChanged}
                  @focusin=${this._onFocus}
                  no-spinner
                  .required=${this.required}
                  .autoValidate=${this.autoValidate}
                  min="0"
                  .disabled=${this.disabled}
                  suffix=":"
                  class="hasSuffix"
                >
                </ha-textfield>
              `:""}

          <ha-textfield
            id="hour"
            type="number"
            inputmode="numeric"
            .value=${this.hours.toFixed()}
            .label=${this.hourLabel}
            name="hours"
            @change=${this._valueChanged}
            @focusin=${this._onFocus}
            no-spinner
            .required=${this.required}
            .autoValidate=${this.autoValidate}
            maxlength="2"
            max=${(0,n.J)(this._hourMax)}
            min="0"
            .disabled=${this.disabled}
            suffix=":"
            class="hasSuffix"
          >
          </ha-textfield>
          <ha-textfield
            id="min"
            type="number"
            inputmode="numeric"
            .value=${this._formatValue(this.minutes)}
            .label=${this.minLabel}
            @change=${this._valueChanged}
            @focusin=${this._onFocus}
            name="minutes"
            no-spinner
            .required=${this.required}
            .autoValidate=${this.autoValidate}
            maxlength="2"
            max="59"
            min="0"
            .disabled=${this.disabled}
            .suffix=${this.enableSecond?":":""}
            class=${this.enableSecond?"has-suffix":""}
          >
          </ha-textfield>
          ${this.enableSecond?d.qy`<ha-textfield
                id="sec"
                type="number"
                inputmode="numeric"
                .value=${this._formatValue(this.seconds)}
                .label=${this.secLabel}
                @change=${this._valueChanged}
                @focusin=${this._onFocus}
                name="seconds"
                no-spinner
                .required=${this.required}
                .autoValidate=${this.autoValidate}
                maxlength="2"
                max="59"
                min="0"
                .disabled=${this.disabled}
                .suffix=${this.enableMillisecond?":":""}
                class=${this.enableMillisecond?"has-suffix":""}
              >
              </ha-textfield>`:""}
          ${this.enableMillisecond?d.qy`<ha-textfield
                id="millisec"
                type="number"
                .value=${this._formatValue(this.milliseconds,3)}
                .label=${this.millisecLabel}
                @change=${this._valueChanged}
                @focusin=${this._onFocus}
                name="milliseconds"
                no-spinner
                .required=${this.required}
                .autoValidate=${this.autoValidate}
                maxlength="3"
                max="999"
                min="0"
                .disabled=${this.disabled}
              >
              </ha-textfield>`:""}
          ${!this.clearable||this.required||this.disabled?d.s6:d.qy`<ha-icon-button
                label="clear"
                @click=${this._clearValue}
                .path=${"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"}
              ></ha-icon-button>`}
        </div>

        ${24===this.format?"":d.qy`<ha-select
              .required=${this.required}
              .value=${this.amPm}
              .disabled=${this.disabled}
              name="amPm"
              naturalMenuWidth
              fixedMenuPosition
              @selected=${this._valueChanged}
              @closed=${s.d}
            >
              <mwc-list-item value="AM">AM</mwc-list-item>
              <mwc-list-item value="PM">PM</mwc-list-item>
            </ha-select>`}
        ${this.helper?d.qy`<ha-input-helper-text>${this.helper}</ha-input-helper-text>`:""}
      </div>
    `}},{kind:"method",key:"_clearValue",value:function(){(0,r.r)(this,"value-changed")}},{kind:"method",key:"_valueChanged",value:function(e){const t=e.currentTarget;this[t.name]="amPm"===t.name?t.value:Number(t.value);const a={hours:this.hours,minutes:this.minutes,seconds:this.seconds,milliseconds:this.milliseconds};this.enableDay&&(a.days=this.days),12===this.format&&(a.amPm=this.amPm),(0,r.r)(this,"value-changed",{value:a})}},{kind:"method",key:"_onFocus",value:function(e){e.currentTarget.select()}},{kind:"method",key:"_formatValue",value:function(e,t=2){return e.toString().padStart(t,"0")}},{kind:"get",key:"_hourMax",value:function(){if(!this.noHoursLimit)return 12===this.format?12:23}},{kind:"field",static:!0,key:"styles",value(){return d.AH`
    :host([clearable]) {
      position: relative;
    }
    :host {
      display: block;
    }
    .time-input-wrap-wrap {
      display: flex;
    }
    .time-input-wrap {
      display: flex;
      border-radius: var(--mdc-shape-small, 4px) var(--mdc-shape-small, 4px) 0 0;
      overflow: hidden;
      position: relative;
      direction: ltr;
      padding-right: 3px;
    }
    ha-textfield {
      width: 55px;
      text-align: center;
      --mdc-shape-small: 0;
      --text-field-appearance: none;
      --text-field-padding: 0 4px;
      --text-field-suffix-padding-left: 2px;
      --text-field-suffix-padding-right: 0;
      --text-field-text-align: center;
    }
    ha-textfield.hasSuffix {
      --text-field-padding: 0 0 0 4px;
    }
    ha-textfield:first-child {
      --text-field-border-top-left-radius: var(--mdc-shape-medium);
    }
    ha-textfield:last-child {
      --text-field-border-top-right-radius: var(--mdc-shape-medium);
    }
    ha-select {
      --mdc-shape-small: 0;
      width: 85px;
    }
    :host([clearable]) .mdc-select__anchor {
        padding-inline-end: var(--select-selected-text-padding-end, 12px);
    }
    ha-icon-button {
      position: relative
      --mdc-icon-button-size: 36px;
      --mdc-icon-size: 20px;
      color: var(--secondary-text-color);
      direction: var(--direction);
      display: flex;
      align-items: center;
      background-color:var(--mdc-text-field-fill-color, whitesmoke);
      border-bottom-style: solid;
      border-bottom-width: 1px;
    }
    label {
      -moz-osx-font-smoothing: grayscale;
      -webkit-font-smoothing: antialiased;
      font-family: var(
        --mdc-typography-body2-font-family,
        var(--mdc-typography-font-family, Roboto, sans-serif)
      );
      font-size: var(--mdc-typography-body2-font-size, 0.875rem);
      line-height: var(--mdc-typography-body2-line-height, 1.25rem);
      font-weight: var(--mdc-typography-body2-font-weight, 400);
      letter-spacing: var(
        --mdc-typography-body2-letter-spacing,
        0.0178571429em
      );
      text-decoration: var(--mdc-typography-body2-text-decoration, inherit);
      text-transform: var(--mdc-typography-body2-text-transform, inherit);
      color: var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87));
      padding-left: 4px;
      padding-inline-start: 4px;
      padding-inline-end: initial;
    }
  `}}]}}),d.WF)},4110:(e,t,a)=>{var i=a(5461),d=a(8597),l=a(196),n=a(9655),r=a(3167);a(2560);(0,i.A)([(0,l.EM)("ha-time-input")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,l.MZ)({attribute:!1})],key:"locale",value:void 0},{kind:"field",decorators:[(0,l.MZ)()],key:"value",value:void 0},{kind:"field",decorators:[(0,l.MZ)()],key:"label",value:void 0},{kind:"field",decorators:[(0,l.MZ)()],key:"helper",value:void 0},{kind:"field",decorators:[(0,l.MZ)({type:Boolean})],key:"disabled",value(){return!1}},{kind:"field",decorators:[(0,l.MZ)({type:Boolean})],key:"required",value(){return!1}},{kind:"field",decorators:[(0,l.MZ)({type:Boolean,attribute:"enable-second"})],key:"enableSecond",value(){return!1}},{kind:"field",decorators:[(0,l.MZ)({type:Boolean,reflect:!0})],key:"clearable",value:void 0},{kind:"method",key:"render",value:function(){const e=(0,n.J)(this.locale),t=this.value?.split(":")||[];let a=t[0];const i=Number(t[0]);return i&&e&&i>12&&i<24&&(a=String(i-12).padStart(2,"0")),e&&0===i&&(a="12"),d.qy`
      <ha-base-time-input
        .label=${this.label}
        .hours=${Number(a)}
        .minutes=${Number(t[1])}
        .seconds=${Number(t[2])}
        .format=${e?12:24}
        .amPm=${e&&i>=12?"PM":"AM"}
        .disabled=${this.disabled}
        @value-changed=${this._timeChanged}
        .enableSecond=${this.enableSecond}
        .required=${this.required}
        .clearable=${this.clearable&&void 0!==this.value}
        .helper=${this.helper}
      ></ha-base-time-input>
    `}},{kind:"method",key:"_timeChanged",value:function(e){e.stopPropagation();const t=e.detail.value,a=(0,n.J)(this.locale);let i;if(!(void 0===t||isNaN(t.hours)&&isNaN(t.minutes)&&isNaN(t.seconds))){let e=t.hours||0;t&&a&&("PM"===t.amPm&&e<12&&(e+=12),"AM"===t.amPm&&12===e&&(e=0)),i=`${e.toString().padStart(2,"0")}:${t.minutes?t.minutes.toString().padStart(2,"0"):"00"}:${t.seconds?t.seconds.toString().padStart(2,"0"):"00"}`}i!==this.value&&(this.value=i,(0,r.r)(this,"change"),(0,r.r)(this,"value-changed",{value:i}))}}]}}),d.WF)},6415:(e,t,a)=>{a.d(t,{Hg:()=>d,Wj:()=>l,jG:()=>i,ow:()=>n,zt:()=>r});let i=function(e){return e.language="language",e.system="system",e.comma_decimal="comma_decimal",e.decimal_comma="decimal_comma",e.space_comma="space_comma",e.none="none",e}({}),d=function(e){return e.language="language",e.system="system",e.am_pm="12",e.twenty_four="24",e}({}),l=function(e){return e.local="local",e.server="server",e}({}),n=function(e){return e.language="language",e.system="system",e.DMY="DMY",e.MDY="MDY",e.YMD="YMD",e}({}),r=function(e){return e.language="language",e.monday="monday",e.tuesday="tuesday",e.wednesday="wednesday",e.thursday="thursday",e.friday="friday",e.saturday="saturday",e.sunday="sunday",e}({})}};
//# sourceMappingURL=Xpo7wC_A.js.map