import { useState, effect } from './chunks/vidstack-B8LynzY5.js';
export { defineCustomElement } from './chunks/vidstack-B8LynzY5.js';
export { MediaAnnouncerElement, MediaAudioGainRadioGroupElement, MediaAudioGainSliderElement, MediaCaptionsElement, MediaChapterTitleElement, MediaChaptersRadioGroupElement, MediaControlsElement, MediaControlsGroupElement, MediaGestureElement, MediaGoogleCastButtonElement, MediaLayoutElement, MediaMenuPortalElement, MediaQualitySliderElement, MediaRadioGroupElement, MediaSliderChaptersElement, MediaSliderElement, MediaSliderStepsElement, MediaSliderVideoElement, MediaSpeedSliderElement, MediaSpinnerElement, MediaTitleElement, MediaToggleButtonElement, MediaTooltipContentElement, MediaTooltipElement, MediaTooltipTriggerElement } from './chunks/vidstack-BO8FLks6.js';
export { MediaPlayerElement, MediaProviderElement } from './chunks/vidstack-C8F1EUBn.js';
import { MediaThumbnailElement } from './chunks/vidstack-Db22EuE_.js';
export { MediaAirPlayButtonElement, MediaAudioRadioGroupElement, MediaCaptionButtonElement, MediaCaptionsRadioGroupElement, MediaFullscreenButtonElement, MediaLiveButtonElement, MediaMenuButtonElement, MediaMenuElement, MediaMenuItemElement, MediaMenuItemsElement, MediaMuteButtonElement, MediaPIPButtonElement, MediaPlayButtonElement, MediaPosterElement, MediaQualityRadioGroupElement, MediaRadioElement, MediaSeekButtonElement, MediaSliderPreviewElement, MediaSliderValueElement, MediaSpeedRadioGroupElement, MediaTimeElement, MediaTimeSliderElement, MediaVolumeSliderElement } from './chunks/vidstack-Db22EuE_.js';
export { MediaAudioLayoutElement, MediaVideoLayoutElement } from './chunks/vidstack-gEJMQpTE.js';
export { MediaPlyrLayoutElement } from './chunks/vidstack-FHGkN5xj.js';
import { Slider } from './chunks/vidstack-B8_v1VQn.js';
import { useMediaContext } from './chunks/vidstack-B4CWj0Hp.js';
import './chunks/vidstack-B8P1aUCK.js';
import './chunks/vidstack-C19bj3Wq.js';
import './chunks/vidstack-BOTZD4tC.js';
import 'lit-html';
import './chunks/vidstack-CwTj4H1w.js';
import './chunks/vidstack-DhF59-Up.js';
import './chunks/vidstack-CdBfecZT.js';
import 'lit-html/directives/if-defined.js';
import 'lit-html/directives/unsafe-svg.js';
import 'lit-html/async-directive.js';
import 'lit-html/directives/ref.js';
import 'lit-html/directives/keyed.js';
import './chunks/vidstack-DbvCOsqU.js';
import 'lit-html/directives/unsafe-html.js';
import '@floating-ui/dom';

class MediaSliderThumbnailElement extends MediaThumbnailElement {
  static tagName = "media-slider-thumbnail";
  #media;
  #slider;
  onSetup() {
    super.onSetup();
    this.#media = useMediaContext();
    this.#slider = useState(Slider.state);
  }
  onConnect() {
    super.onConnect();
    effect(this.#watchTime.bind(this));
  }
  #watchTime() {
    const { duration, clipStartTime } = this.#media.$state;
    this.time = clipStartTime() + this.#slider.pointerRate() * duration();
  }
}

export { MediaSliderThumbnailElement, MediaThumbnailElement };
