/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
import { c as C } from "../../chunks/runtime.js";
import { css as M, html as c } from "lit";
import { LitElement as O, createEvent as S, nothing as T, safeClassMap as u } from "@arcgis/lumina";
import { usePropertyChange as $ } from "@arcgis/lumina/controllers";
import { u as z } from "../../chunks/useT9n.js";
import { m as k } from "../../chunks/useViewModel.js";
import { H as v } from "../../chunks/heading.js";
import { g as m } from "../../chunks/globalCss.js";
import { V as g } from "../../chunks/visible-element.js";
import I from "@arcgis/core/analysis/ShadowCastAnalysis.js";
import { property as n, subclass as P } from "@arcgis/core/core/accessorSupport/decorators.js";
import { A as V } from "../../chunks/AnalysisViewModel.js";
import { watch as E, whenOnce as L } from "@arcgis/core/core/reactiveUtils.js";
import { c as h, g as A } from "../../chunks/time-utils.js";
import { forceInteractive as R } from "@arcgis/core/applications/Components/analysisUtils.js";
const H = M`.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}.esri-widget--panel{min-width:300px;min-height:32px;padding:var(--arcgis-internal-padding);transition:max-height .25s ease-in-out;overflow-y:auto}:host{position:relative;width:var(--arcgis-internal-panel-width, 300px)}.root{--section-internal-gap: var(--calcite-spacing-md);display:flex;flex-direction:column;gap:var(--calcite-spacing-lg);min-width:var(--arcgis-internal-panel-min-width, 300px);overflow:var(--arcgis-internal-panel-overflow, visible);height:fit-content}:host([visual-scale="s"]) .root{--section-internal-gap: var(--calcite-spacing-sm)}:host([visual-scale="l"]) .root{--section-internal-gap: var(--calcite-spacing-lg)}.time-range-section arcgis-time-of-day-slider{margin-block-end:var(--section-internal-gap)}.time-range-section calcite-label:last-child,.visualization-options-section calcite-label:last-child{--calcite-label-margin-bottom: 0}.date-picker{flex-grow:1;display:block}.visualization-options{flex-direction:column;display:flex;gap:var(--section-internal-gap)}.hidden-config{display:none}`;
var j = Object.defineProperty, Z = Object.getOwnPropertyDescriptor, a = (e, i, o, r) => {
  for (var s = r > 1 ? void 0 : r ? Z(i, o) : i, l = e.length - 1, d; l >= 0; l--)
    (d = e[l]) && (s = (r ? d(i, o, s) : d(s)) || s);
  return r && s && j(i, o, s), s;
};
const f = /* @__PURE__ */ Symbol("interactiveHandle");
let t = class extends V {
  constructor() {
    super(...arguments), this.supportedViewType = "3d", this.unsupportedErrorMessage = "The Shadow Cast component is only supported in 3D views.", this.shouldForceInteractive = !1, this.minMinDuration = 0, this.maxMinDuration = h(8, "hours", "milliseconds"), this.hideShadowDurationTooltip = !1;
  }
  constructAnalysis() {
    return new I();
  }
  initialize() {
    this.addHandles(
      E(
        () => ({
          analysisView: this.analysisView,
          tooltipVisible: !this.hideShadowDurationTooltip
        }),
        ({ analysisView: e, tooltipVisible: i }) => {
          this.removeHandles(f), e && (e.interactive = i, i && this.addHandles(R(e), f));
        },
        { sync: !0, initial: !0 }
      )
    );
  }
  get date() {
    return this.analysis.date;
  }
  set date(e) {
    this.analysis.date = e;
  }
  get discreteColor() {
    return this.analysis.discreteOptions.color;
  }
  set discreteColor(e) {
    this.analysis.discreteOptions.color = e;
  }
  get discreteInterval() {
    return this.analysis.discreteOptions.interval;
  }
  set discreteInterval(e) {
    this.analysis.discreteOptions.interval = e;
  }
  get totalDurationColor() {
    return this.analysis.totalDurationOptions.color;
  }
  set totalDurationColor(e) {
    this.analysis.totalDurationOptions.color = e;
  }
  get totalDurationMode() {
    return this.analysis.totalDurationOptions.mode;
  }
  set totalDurationMode(e) {
    this.analysis.totalDurationOptions.mode = e;
  }
  get localDate() {
    return A(this.view);
  }
  get mode() {
    return this.analysis.mode;
  }
  set mode(e) {
    this.analysis.mode = e;
  }
  get visualizeSunlight() {
    return this.analysis.visualizeSunlight;
  }
  set visualizeSunlight(e) {
    this.analysis.visualizeSunlight = e;
  }
  get startTimeOfDay() {
    return this.analysis.startTimeOfDay;
  }
  set startTimeOfDay(e) {
    this.analysis.startTimeOfDay = e;
  }
  get endTimeOfDay() {
    return this.analysis.endTimeOfDay;
  }
  set endTimeOfDay(e) {
    this.analysis.endTimeOfDay = e;
  }
  get state() {
    return this.view?.ready && this.analysisView ? "ready" : "disabled";
  }
  get minDurationColor() {
    return this.analysis.minDurationOptions.color;
  }
  set minDurationColor(e) {
    this.analysis.minDurationOptions.color = e;
  }
  get minDuration() {
    return this.analysis.minDurationOptions.minDuration;
  }
  set minDuration(e) {
    this.analysis.minDurationOptions.minDuration = e;
  }
  get minDurationContextEnabled() {
    return this.analysis.minDurationOptions.contextEnabled;
  }
  set minDurationContextEnabled(e) {
    this.analysis.minDurationOptions.contextEnabled = e;
  }
  get minDurationContextColor() {
    return this.analysis.minDurationOptions.contextOptions.color;
  }
  set minDurationContextColor(e) {
    this.analysis.minDurationOptions.contextOptions.color = e;
  }
  get minDurationContextInterval() {
    return this.analysis.minDurationOptions.contextOptions.interval;
  }
  set minDurationContextInterval(e) {
    this.analysis.minDurationOptions.contextOptions.interval = e;
  }
  get utcOffset() {
    return this.analysis.utcOffset;
  }
  set utcOffset(e) {
    this.analysis.utcOffset = e;
  }
  async getDurationAtScreen(e) {
    return await (await L(() => this.analysisView)).getDurationAtScreen(e);
  }
};
a([
  n()
], t.prototype, "date", 1);
a([
  n()
], t.prototype, "discreteColor", 1);
a([
  n()
], t.prototype, "discreteInterval", 1);
a([
  n()
], t.prototype, "totalDurationColor", 1);
a([
  n()
], t.prototype, "totalDurationMode", 1);
a([
  n()
], t.prototype, "localDate", 1);
a([
  n()
], t.prototype, "mode", 1);
a([
  n()
], t.prototype, "visualizeSunlight", 1);
a([
  n()
], t.prototype, "startTimeOfDay", 1);
a([
  n()
], t.prototype, "endTimeOfDay", 1);
a([
  n()
], t.prototype, "state", 1);
a([
  n()
], t.prototype, "minDurationColor", 1);
a([
  n()
], t.prototype, "minMinDuration", 2);
a([
  n()
], t.prototype, "maxMinDuration", 2);
a([
  n()
], t.prototype, "minDuration", 1);
a([
  n()
], t.prototype, "minDurationContextEnabled", 1);
a([
  n()
], t.prototype, "minDurationContextColor", 1);
a([
  n()
], t.prototype, "minDurationContextInterval", 1);
a([
  n()
], t.prototype, "utcOffset", 1);
a([
  n()
], t.prototype, "hideShadowDurationTooltip", 2);
t = a([
  P("components.shadow-cast.ShadowCastViewModel")
], t);
const B = k(t);
class F extends O {
  constructor() {
    super(...arguments), this.viewModel = B(this), this.messages = z(), this.analysis = this.viewModel.analysis, this.view = this.viewModel.view, this.visualizeSunlight = this.viewModel.visualizeSunlight, this.visualScale = "m", this.autoDestroyDisabled = !1, this.endTimeOfDay = this.viewModel.endTimeOfDay, this.headingLevel = 4, this.hideTimeRangeSlider = !1, this.hideTimezone = !1, this.hideDatePicker = !1, this.hideShadowDurationTooltip = this.viewModel.hideShadowDurationTooltip, this.hideVisualization = this.viewModel.hideVisualization, this.hideVisualizationOptions = !1, this.hideDiscreteOptions = !1, this.hideDiscreteColorPicker = !1, this.hideDiscreteInterval = !1, this.hideTotalDurationOptions = !1, this.hideTotalDurationColorPicker = !1, this.hideTotalDurationModeSelect = !1, this.hideMinDurationOptions = !1, this.hideMinDurationColorPicker = !1, this.hideMinDurationSlider = !1, this.hideMinDurationContextOptions = !1, this.hideMinDurationContextToggle = !1, this.hideMinDurationContextColorPicker = !1, this.hideMinDurationContextInterval = !1, this.icon = "measure-building-height-shadow", this.mode = this.viewModel.mode, this.startTimeOfDay = this.viewModel.startTimeOfDay, this.state = this.viewModel.state, this.utcOffset = this.viewModel.utcOffset, this.discreteColor = this.viewModel.discreteColor, this.discreteInterval = this.viewModel.discreteInterval, this.totalDurationColor = this.viewModel.totalDurationColor, this.totalDurationMode = this.viewModel.totalDurationMode, this.minDuration = this.viewModel.minDuration, this.minDurationColor = this.viewModel.minDurationColor, this.minMinDuration = this.viewModel.minMinDuration, this.maxMinDuration = this.viewModel.maxMinDuration, this.minDurationContextEnabled = this.viewModel.minDurationContextEnabled, this.minDurationContextColor = this.viewModel.minDurationContextColor, this.minDurationContextInterval = this.viewModel.minDurationContextInterval, this.arcgisPropertyChange = $()("state"), this.arcgisReady = S();
  }
  static {
    this.properties = { analysis: 0, view: 0, visualizeSunlight: 5, visualScale: 3, autoDestroyDisabled: 5, date: 1, endTimeOfDay: 9, headingLevel: 9, hideTimeRangeSlider: 5, hideTimezone: 5, hideDatePicker: 5, hideShadowDurationTooltip: 5, hideVisualization: 5, hideVisualizationOptions: 5, hideDiscreteOptions: 5, hideDiscreteColorPicker: 5, hideDiscreteInterval: 5, hideTotalDurationOptions: 5, hideTotalDurationColorPicker: 5, hideTotalDurationModeSelect: 5, hideMinDurationOptions: 5, hideMinDurationColorPicker: 5, hideMinDurationSlider: 5, hideMinDurationContextOptions: 5, hideMinDurationContextToggle: 5, hideMinDurationContextColorPicker: 5, hideMinDurationContextInterval: 5, icon: 3, label: 1, mode: 1, referenceElement: 1, startTimeOfDay: 9, state: 32, utcOffset: 9, discreteColor: 0, discreteInterval: 9, totalDurationColor: 0, totalDurationMode: 1, minDuration: 9, minDurationColor: 0, minMinDuration: 9, maxMinDuration: 9, minDurationContextEnabled: 5, minDurationContextColor: 0, minDurationContextInterval: 9 };
  }
  static {
    this.styles = H;
  }
  get _effectiveMessages() {
    const { messages: i, visualizeSunlight: o } = this, { sunlight: r } = i;
    return {
      ...i,
      discrete: o ? r?.discrete : i.discrete,
      minDuration: o ? r?.minDuration : i.minDuration,
      totalDuration: o ? r?.totalDuration : i.totalDuration,
      timeInShadow: o ? i.timeInSunlight : i.timeInShadow,
      timeRangeSliderLabel: i.timeRangeSliderLabel
    };
  }
  get date() {
    return this.viewModel.date;
  }
  set date(i) {
    this.viewModel.date = i;
  }
  async destroy() {
    await this.manager.destroy();
  }
  async getDurationAtScreen(i) {
    return await this.viewModel.getDurationAtScreen(i);
  }
  render() {
    const { _effectiveMessages: i } = this;
    return c`<div aria-label=${i.componentLabel ?? T} class=${u({
      root: !0,
      [m.widget]: !0,
      [m.widgetDisabled]: this.viewModel.state === "disabled",
      [m.panel]: !0
    })} role=presentation>${this._renderTimeRangeSection()}${g({ hidden: this.hideVisualizationOptions, children: this._renderVisualizationOptionsSection() })}</div>`;
  }
  _renderTimeRangeSection() {
    if (!this.analysis || this.hideTimeRangeSlider && this.hideDatePicker)
      return;
    const { _effectiveMessages: i, utcOffset: o, viewModel: r } = this, s = this.visualScale;
    return c`<section class="time-range-section">${v({ level: this.headingLevel, children: i.timeRangeHeading })}${g({ hidden: this.hideTimeRangeSlider, children: this._renderTimeRange() })}${g({ hidden: this.hideTimezone, children: c`<calcite-label .scale=${s}>${i.timezoneLabel}<calcite-input-time-zone mode=offset overlay-positioning=fixed .referenceDate=${r.localDate} .scale=${s} .value=${`${h(o ?? 0, "hours", "minutes")}`} @calciteInputTimeZoneChange=${(l) => {
      r.utcOffset = +l.target.value / 60;
    }}></calcite-input-time-zone></calcite-label>` })}${g({ hidden: this.hideDatePicker, children: c`<calcite-label .scale=${s}>${i.dateLabel}<calcite-input-date-picker overlay-positioning=fixed placement=bottom .scale=${s} .valueAsDate=${r.date} @calciteInputDatePickerChange=${(l) => {
      const d = l.currentTarget.valueAsDate;
      r.date = Array.isArray(d) ? d[0] : d;
    }}></calcite-input-date-picker></calcite-label>` })}</section>`;
  }
  _renderTimeRange() {
    const { _effectiveMessages: i, viewModel: o } = this;
    return c`<arcgis-time-of-day-slider mode=range .startTime=${w(this.startTimeOfDay)} .endTime=${w(this.endTimeOfDay)} .label=${i.timeRangeSliderLabel} .visualScale=${this.visualScale} @arcgisTimeChange=${({ currentTarget: r }) => {
      o.startTimeOfDay = h(r.startTime, "minutes", "milliseconds"), o.endTimeOfDay = h(r.endTime, "minutes", "milliseconds");
    }}></arcgis-time-of-day-slider>`;
  }
  _renderVisualizationOptionsSection() {
    const { analysis: i, _effectiveMessages: o, headingLevel: r, viewModel: s } = this;
    if (!i)
      return;
    const { discreteOptions: l, totalDurationOptions: d, minDurationOptions: D } = i, p = (y, b) => s.mode === y && !b ? void 0 : "hidden-config", x = this.hideMinDurationContextOptions || this.visualizeSunlight, _ = this.hideMinDurationContextToggle || this.visualizeSunlight;
    return c`<section class="visualization-options-section">${v({ level: r, children: o.visualizationLabel })}<div class="visualization-options">${this._renderModeSelect()}<div class=${u(p("min-duration", this.hideMinDurationOptions))}><arcgis-shadow-cast-min-duration-config .hideColorPicker=${this.hideMinDurationColorPicker} .hideContextColorPicker=${this.hideMinDurationContextColorPicker} .hideContextInterval=${this.hideMinDurationContextInterval} .hideContextOptions=${x} .hideContextToggle=${_} .hideSlider=${this.hideMinDurationSlider} .minMinDuration=${this.minMinDuration} .maxMinDuration=${this.maxMinDuration} .messages=${o} .options=${D} .scale=${this.visualScale}></arcgis-shadow-cast-min-duration-config></div><div class=${u(p("total-duration", this.hideTotalDurationOptions))}><arcgis-shadow-cast-total-duration-config .hideColorPicker=${this.hideTotalDurationColorPicker} .hideModeSelect=${this.hideTotalDurationModeSelect} .messages=${o} .options=${d} .scale=${this.visualScale}></arcgis-shadow-cast-total-duration-config></div><div class=${u(p("discrete", this.hideDiscreteOptions))}><arcgis-shadow-cast-discrete-config .hideColorPicker=${this.hideDiscreteColorPicker} .hideInterval=${this.hideDiscreteInterval} .messages=${o} .options=${l} .scale=${this.visualScale}></arcgis-shadow-cast-discrete-config></div></div></section>`;
  }
  _renderModeSelect() {
    const { _effectiveMessages: i, viewModel: o } = this, { mode: r } = o;
    return c`<calcite-select .label=${i.visualizationLabel ?? ""} .scale=${this.visualScale} @calciteSelectChange=${(s) => {
      const l = s.target.selectedOption?.value;
      o.mode = l ?? "min-duration";
    }}>${[
      { mode: "min-duration", label: i.minDuration?.optionLabel },
      { mode: "total-duration", label: i.totalDuration?.optionLabel },
      { mode: "discrete", label: i.discrete?.optionLabel }
    ].map(({ mode: s, label: l }) => c`<calcite-option .selected=${s === r} .value=${s} .label=${l}></calcite-option>`)}</calcite-select>`;
  }
}
function w(e) {
  return Math.round(h(e, "milliseconds", "minutes"));
}
C("arcgis-shadow-cast", F);
export {
  F as ArcgisShadowCast
};
