import {
  FadeController
} from "./chunk.W2YDXTG5.js";
import {
  ScrollController
} from "./chunk.6RE6UZ72.js";
import {
  SdCarouselItem
} from "./chunk.5NTF57TJ.js";
import {
  AutoplayController
} from "./chunk.F4VGSDIW.js";
import {
  LocalizeController
} from "./chunk.X3FE7OHE.js";
import {
  watch
} from "./chunk.X2OQMWGY.js";
import {
  SolidElement,
  customElement
} from "./chunk.H53WQBDK.js";
import {
  prefersReducedMotion
} from "./chunk.HQWAKJBV.js";
import {
  __decorateClass
} from "./chunk.S3NI7NKU.js";

// src/internal/math.ts
function clamp(value, min, max) {
  const noNegativeZero = (n) => Object.is(n, -0) ? 0 : n;
  if (value < min) {
    return noNegativeZero(min);
  }
  if (value > max) {
    return noNegativeZero(max);
  }
  return noNegativeZero(value);
}

// src/components/carousel/carousel.ts
import { css, html } from "lit";
import { map } from "lit/directives/map.js";
import { property, query, queryAll, state } from "lit/decorators.js";
import { range } from "lit/directives/range.js";
import cx from "classix";
var SdCarousel = class extends SolidElement {
  constructor() {
    super(...arguments);
    this.variant = "number";
    this.inverted = false;
    this.loop = false;
    this.autoplay = false;
    this.autoplayInterval = 5;
    this.fade = false;
    this.slidesPerPage = 1;
    this.slidesPerMove = 1;
    this.activeSlide = 0;
    this.currentPage = 1;
    this.pausedAutoplay = false;
    this.isFocused = false;
    this.autoplayController = new AutoplayController(this, () => {
      if (!this.isFocused) this.next();
    });
    this.scrollController = new ScrollController(this);
    this.slides = this.getElementsByTagName("sd-6-22-0-carousel-item");
    // determines which slide is displayed
    // A map containing the state of all the slides
    this.intersectionObserverEntries = /* @__PURE__ */ new Map();
    this.localize = new LocalizeController(this);
    this.userInteracted = false;
    this.fadeController = new FadeController(this);
    this.handleUserInteraction = () => {
      this.userInteracted = true;
    };
    this.handleSlotChange = (mutations) => {
      const needsInitialization = mutations.some(
        (mutation) => [...mutation.addedNodes, ...mutation.removedNodes].some(
          (node) => SdCarouselItem.isCarouselItem(node) && !node.hasAttribute("data-clone")
        )
      );
      if (needsInitialization) {
        this.initializeSlides();
      }
      this.requestUpdate();
    };
    this.unblockAutoplay = (e, button) => {
      if (e.detail) {
        button.blur();
      }
    };
  }
  connectedCallback() {
    super.connectedCallback();
    ["click", "keydown"].forEach((event) => this.addEventListener(event, this.handleUserInteraction));
    this.addEventListener("focusin", this.handleFocus);
    this.addEventListener("focusout", this.handleBlur);
    this.addEventListener("keydown", this.handleKeyDown);
    const intersectionObserver = new IntersectionObserver(
      (entries) => {
        entries.forEach((entry) => {
          this.intersectionObserverEntries.set(entry.target, entry);
          const slide = entry.target;
          slide.toggleAttribute("inert", !entry.isIntersecting);
          slide.classList.toggle("--in-view", entry.isIntersecting);
          slide.setAttribute("aria-hidden", entry.isIntersecting ? "false" : "true");
        });
      },
      {
        root: this,
        threshold: 0.6
      }
    );
    this.intersectionObserver = intersectionObserver;
    intersectionObserver.takeRecords().forEach((entry) => {
      this.intersectionObserverEntries.set(entry.target, entry);
    });
  }
  disconnectedCallback() {
    super.disconnectedCallback();
    this.intersectionObserver.disconnect();
    this.mutationObserver.disconnect();
    ["click", "keydown"].forEach((event) => this.removeEventListener(event, this.handleUserInteraction));
    this.removeEventListener("focusin", this.handleFocus);
    this.removeEventListener("focusout", this.handleBlur);
    this.removeEventListener("keydown", this.handleKeyDown);
    if (this.fade) {
      this.fadeController.disable();
    }
  }
  async firstUpdated() {
    const areSlidesReady = (() => {
      const slides = this.getSlides({ excludeClones: false });
      return slides.length > 0 && slides[0].getBoundingClientRect().width > 0;
    })();
    if (areSlidesReady) {
      this.initializeSlides();
    } else {
      const initObserver = new IntersectionObserver((entries) => {
        entries.forEach((entry) => {
          if (entry.isIntersecting && entry.target.getBoundingClientRect().width > 0) {
            this.initializeSlides();
            initObserver.disconnect();
          }
        });
      });
      initObserver.observe(this);
    }
    this.mutationObserver = new MutationObserver(this.handleSlotChange);
    this.mutationObserver.observe(this, { childList: true, subtree: false });
    if (this.fade) {
      await this.updateComplete;
      this.fadeController.enable();
    }
  }
  getPageCount(totalSlides, slidesPerPage, slidesPerMove) {
    return Math.ceil((totalSlides - slidesPerPage) / slidesPerMove) + 1 > 0 ? Math.ceil((totalSlides - slidesPerPage) / slidesPerMove) + 1 : (
      // Returns 1 if the total number of slides is less than the number of slides per page
      1
    );
  }
  getCurrentPage(totalSlides, activeSlide, slidesPerPage, slidesPerMove) {
    return Math.ceil((totalSlides - slidesPerPage) / slidesPerMove) - Math.ceil((totalSlides - slidesPerPage - activeSlide) / slidesPerMove) + 1;
  }
  getSlides({ excludeClones = true } = {}) {
    return [...this.slides].filter((slide) => !excludeClones || !slide.hasAttribute("data-clone"));
  }
  handleKeyDown(event) {
    if (["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown", "Home", "End"].includes(event.key)) {
      const target = event.target;
      const isRtl = this.localize.dir() === "rtl";
      const isFocusInPagination = target.closest('[part~="pagination-item"]') !== null;
      const isNext = event.key === "ArrowDown" || !isRtl && event.key === "ArrowRight" || isRtl && event.key === "ArrowLeft";
      const isPrevious = event.key === "ArrowUp" || !isRtl && event.key === "ArrowLeft" || isRtl && event.key === "ArrowRight";
      event.preventDefault();
      if (isPrevious) {
        this.previous();
      }
      if (isNext) {
        this.next();
      }
      if (event.key === "Home") {
        this.goToSlide(0);
      }
      if (event.key === "End") {
        this.goToSlide(this.getSlides().length - 1);
      }
      if (isFocusInPagination) {
        this.updateComplete.then(() => {
          var _a;
          const activePaginationItem = (_a = this.shadowRoot) == null ? void 0 : _a.querySelector(
            '[part~="pagination-item--active"]'
          );
          if (activePaginationItem) {
            activePaginationItem.focus();
          }
        });
      }
    }
  }
  handleScrollEnd() {
    if (this.fade) {
      return;
    }
    const slides = this.getSlides();
    const entries = [...this.intersectionObserverEntries.values()];
    const firstIntersecting = entries.find((entry) => entry.isIntersecting);
    if (this.loop && (firstIntersecting == null ? void 0 : firstIntersecting.target.hasAttribute("data-clone"))) {
      const clonePosition = Number(firstIntersecting.target.getAttribute("data-clone"));
      this.goToSlide(clonePosition, "auto");
      return;
    }
    if (firstIntersecting) {
      this.activeSlide = slides.indexOf(firstIntersecting.target);
    }
  }
  handleFocus() {
    this.isFocused = true;
  }
  handleBlur() {
    this.isFocused = false;
  }
  getSlideText(slide) {
    var _a;
    const parts = [];
    const walker = document.createTreeWalker(slide, NodeFilter.SHOW_ALL);
    let node = walker.nextNode();
    while (node) {
      if (node.nodeType === Node.TEXT_NODE) {
        const text = (_a = node.textContent) == null ? void 0 : _a.trim();
        if (text) parts.push(text);
      } else if (node instanceof HTMLImageElement && node.alt) {
        parts.push(node.alt);
      }
      node = walker.nextNode();
    }
    return parts.join(" ");
  }
  /**
   * Pause the autoplay.
   */
  pause() {
    this.pausedAutoplay = true;
  }
  /**
   * Resume the autoplay
   */
  resume() {
    this.pausedAutoplay = false;
  }
  handlePausedAutoplay() {
    if (this.pausedAutoplay) {
      this.autoplayController.stop();
    } else if (this.autoplay) {
      this.autoplayController.start(this.autoplayInterval * 1e3);
    }
  }
  handleFadeChange() {
    if (this.fade) {
      this.fadeController.enable();
    } else {
      this.fadeController.disable();
    }
  }
  initializeSlides() {
    const slides = this.getSlides();
    const intersectionObserver = this.intersectionObserver;
    this.intersectionObserverEntries.clear();
    this.getSlides({ excludeClones: false }).forEach((slide, index) => {
      intersectionObserver.unobserve(slide);
      slide.classList.remove("--in-view");
      slide.classList.remove("--is-active");
      slide.setAttribute("aria-label", this.localize.term("slideNum", index + 1, slides.length));
      if (slide.hasAttribute("data-clone")) {
        slide.remove();
      }
    });
    if (this.loop && !this.fade) {
      const slidesPerPage = this.slidesPerPage;
      const lastSlides = slides.slice(-slidesPerPage);
      const firstSlides = slides.slice(0, slidesPerPage);
      lastSlides.reverse().forEach((slide, i) => {
        const clone = slide.cloneNode(true);
        clone.setAttribute("data-clone", String(slides.length - i - 1));
        this.prepend(clone);
      });
      firstSlides.forEach((slide, i) => {
        const clone = slide.cloneNode(true);
        clone.setAttribute("data-clone", String(i));
        this.append(clone);
      });
    }
    this.getSlides({ excludeClones: false }).forEach((slide) => {
      intersectionObserver.observe(slide);
    });
    if (this.fade) {
      this.updateComplete.then(() => {
        this.fadeController.enable();
      });
    }
    if (!this.fade) {
      this.goToSlide(this.activeSlide, "auto");
    }
  }
  handleSlideChange() {
    const slides = this.getSlides();
    slides.forEach((slide, i) => {
      slide.classList.toggle("--is-active", i === this.activeSlide);
    });
    if (this.fade) {
      this.fadeController.updateActiveSlide(this.activeSlide);
    }
    const newCurrentPage = this.getCurrentPage(slides.length, this.activeSlide, this.slidesPerPage, this.slidesPerMove);
    if (this.currentPage !== newCurrentPage) {
      this.currentPage = newCurrentPage;
    }
    if (this.hasUpdated) {
      this.emit("sd-slide-change", {
        detail: {
          index: this.activeSlide,
          slide: slides[this.activeSlide]
        }
      });
      if (this.announcementRegion) {
        const text = this.getSlideText(slides[this.activeSlide]);
        const position = this.localize.term("slideNum", this.activeSlide + 1, slides.length);
        requestAnimationFrame(() => {
          this.announcementRegion.textContent = text ? `${text} ${position}` : position;
        });
      }
    }
    const pageCount = this.getPageCount(slides.length, this.slidesPerPage, this.slidesPerMove);
    if (this.currentPage > pageCount) {
      requestAnimationFrame(() => {
        this.nextTillFirst();
      });
    }
  }
  handleSlidesPerMoveChange() {
    if (this.fade) {
      return;
    }
    const slides = this.getSlides({ excludeClones: false });
    const slidesPerMove = this.slidesPerMove;
    slides.forEach((slide, i) => {
      const shouldSnap = Math.abs(i - slidesPerMove) % slidesPerMove === 0;
      if (shouldSnap) {
        slide.style.removeProperty("scroll-snap-align");
      } else {
        slide.style.setProperty("scroll-snap-align", "none");
      }
    });
  }
  handleAutoplayChange() {
    this.autoplayController.stop();
    if (this.autoplay && !this.pausedAutoplay) {
      this.autoplayController.start(this.autoplayInterval * 1e3);
    }
  }
  handleautoplayIntervalChange() {
    if (!this.autoplay || this.pausedAutoplay) return;
    this.autoplayController.stop();
    this.autoplayController.start(this.autoplayInterval * 1e3);
  }
  /**
   * Move the carousel backward by `slides-per-move` slides.
   *
   * @param behavior - The behavior used for scrolling.
   */
  previous(behavior = "smooth") {
    if (this.fade) {
      const previousIndex2 = this.loop ? (this.activeSlide - 1 + this.getSlides().length) % this.getSlides().length : Math.max(0, this.activeSlide - 1);
      this.goToSlide(previousIndex2);
      return;
    }
    let previousIndex = this.activeSlide || this.activeSlide - this.slidesPerMove;
    let canSnap = false;
    while (!canSnap && previousIndex > 0) {
      previousIndex -= 1;
      canSnap = Math.abs(previousIndex - this.slidesPerMove) % this.slidesPerMove === 0;
    }
    if (this.currentPage - 1 === 0 && this.loop) {
      this.goToSlide(this.activeSlide - this.slidesPerPage, behavior);
    } else {
      this.goToSlide(previousIndex, behavior);
    }
  }
  /**
   * Move the carousel forward by `slides-per-move` slides.
   *
   * @param behavior - The behavior used for scrolling.
   */
  next(behavior = "smooth") {
    if (this.fade) {
      const nextIndex = this.loop ? (this.activeSlide + 1) % this.getSlides().length : Math.min(this.getSlides().length - 1, this.activeSlide + 1);
      this.goToSlide(nextIndex);
      return;
    }
    if (this.currentPage + 1 <= this.getPageCount(this.getSlides().length, this.slidesPerPage, this.slidesPerMove)) {
      this.goToSlide(this.activeSlide + this.slidesPerMove, behavior);
    } else {
      if (this.loop) {
        this.nextTillFirst(behavior);
      }
    }
  }
  nextTillFirst(behavior = "smooth") {
    if (this.fade) {
      this.goToSlide(0);
      return;
    }
    while (this.activeSlide !== 0) {
      this.goToSlide(this.activeSlide + 1, behavior);
    }
    this.currentPage = this.getCurrentPage(
      this.getSlides().length,
      this.activeSlide,
      this.slidesPerPage,
      this.slidesPerMove
    );
  }
  /**
   * Scrolls the carousel to the slide specified by `index`.
   *
   * @param index - The slide index.
   * @param behavior - The behavior used for scrolling.
   */
  goToSlide(index, behavior = "smooth") {
    const { slidesPerPage, loop, scrollContainer, fade } = this;
    const slides = this.getSlides();
    const slidesWithClones = this.getSlides({ excludeClones: false });
    const newActiveSlide = (index + slides.length) % slides.length;
    this.activeSlide = newActiveSlide;
    if (fade) {
      return;
    }
    const nextSlideIndex = clamp(index + (loop ? slidesPerPage : 0), 0, slidesWithClones.length + 1);
    const nextSlide = slidesWithClones[nextSlideIndex];
    const scrollContainerRect = scrollContainer.getBoundingClientRect();
    const nextSlideRect = nextSlide.getBoundingClientRect();
    scrollContainer.scrollTo({
      left: nextSlideRect.left - scrollContainerRect.left + scrollContainer.scrollLeft,
      top: nextSlideRect.top - scrollContainerRect.top + scrollContainer.scrollTop,
      behavior: prefersReducedMotion() ? "auto" : behavior
    });
    if (this.userInteracted && !this.loop) {
      const isLastSlide = this.activeSlide === slides.length - 1 || this.activeSlide === this.slides.length - this.slidesPerPage;
      const isFirstSlide = this.activeSlide === 0;
      if (isLastSlide) {
        this.previousButton.focus({ preventScroll: true });
      } else if (isFirstSlide) {
        this.nextButton.focus({ preventScroll: true });
      }
    }
  }
  render() {
    const { scrollController, slidesPerMove } = this;
    const pagesCount = this.getPageCount(this.getSlides().length, this.slidesPerPage, this.slidesPerMove);
    const currentPage = this.getCurrentPage(
      this.getSlides().length,
      this.activeSlide,
      this.slidesPerPage,
      this.slidesPerMove
    );
    const prevEnabled = this.loop || currentPage > 1;
    const nextEnabled = this.loop || currentPage < pagesCount;
    const isLtr = this.localize.dir() === "ltr";
    return html`<div part="base" class="${cx(`carousel h-full w-full relative`)}"><button class="${cx(
      "ml-6 !rounded-sm",
      "!absolute !bottom-0 !right-0 sd-interactive",
      this.inverted ? "sd-interactive--inverted" : "sd-interactive--reset",
      !this.autoplay && "!hidden"
    )}" part="autoplay-controls" aria-label="${this.pausedAutoplay ? this.localize.term("startAutoplay") : this.localize.term("stopAutoplay")}" aria-pressed="true" @click="${(e) => {
      this.pausedAutoplay = !this.pausedAutoplay;
      if (e.detail) {
        this.autoplayControls.blur();
      }
    }}"><slot name="autoplay-start" class="${cx(!this.pausedAutoplay ? "hidden" : "")}"><sd-6-22-0-icon class="h-6 w-6 grid place-items-center" library="_internal" name="start"></sd-6-22-0-icon></slot><slot name="autoplay-pause" class="${cx(this.pausedAutoplay ? "hidden" : "")}"><sd-6-22-0-icon class="h-6 w-6 grid place-items-center" library="_internal" name="pause"></sd-6-22-0-icon></slot></button><div class="carousel__announcement sr-only" aria-live="${!this.autoplay || this.pausedAutoplay || this.isFocused ? "polite" : "off"}" aria-atomic="true"></div><div id="scroll-container" part="scroll-container" class="${cx(
      `carousel__slides mb-6 max-h-full w-full items-center justify-items-center`,
      this.inverted ? "focus-visible:focus-outline-inverted" : "focus-visible:focus-outline",
      this.fade ? "relative overflow-hidden" : `grid overflow-auto overscroll-x-contain grid-flow-col auto-rows-[100%] snap-x snap-mandatory overflow-y-hidden`
    )}" style="--slides-per-page:${this.slidesPerPage}" aria-busy="${scrollController.scrolling ? "true" : "false"}" aria-label="${this.localize.term(
      "carouselContainer",
      Array.from(this.slides).filter((el) => !el.hasAttribute("data-clone")).length
    )}" tabindex="0" @scrollend="${this.handleScrollEnd}"><slot></slot></div><div part="controls" class="${cx("w-full flex items-center justify-center relative")}"><div part="navigation" class="${cx("carousel__navigation flex items-center justify-center")}"><button part="navigation-button navigation-button--previous" id="carousel__navigation-button--previous" ?disabled="${!prevEnabled ? true : false}" class="${cx(
      "!mr-6 !rounded-sm sd-interactive transition-colors duration-fast ease-in-out",
      !prevEnabled && "sd-interactive--disabled",
      this.inverted ? "sd-interactive--inverted" : "sd-interactive--reset"
    )}" aria-label="${this.localize.term("previousSlide")}" aria-controls="scroll-container" aria-disabled="${prevEnabled ? "false" : "true"}" @click="${prevEnabled ? (e) => {
      this.previous();
      this.unblockAutoplay(e, this.previousButton);
    } : null}"><slot name="previous-icon"><sd-6-22-0-icon class="${cx("h-6 w-6 rotate-90 grid place-items-center")}" library="_internal" name="${isLtr ? "chevron-down" : "chevron-up"}"></sd-6-22-0-icon></slot></button> ${this.variant === "dot" ? html`<div part="pagination-dot" role="tablist" class="${cx("carousel__pagination dot flex wrap items-center gap-2")}" aria-controls="scroll-container">${map(range(pagesCount), (index) => {
      const isActive = index + 1 === currentPage;
      return html`<button part="pagination-item ${isActive ? "pagination-item--active" : ""}" class="${cx(
        "carousel__pagination-item",
        "block cursor-pointer bg-none border-0 rounded-full",
        isActive ? "bg-accent" : "",
        this.inverted ? "focus-within:focus-outline-inverted" : "focus-within:focus-outline"
      )}" role="tab" tabindex="0" aria-selected="${isActive ? "true" : "false"}" aria-label="${this.localize.term("goToSlide", index + 1, pagesCount)}" @click="${(e) => {
        this.goToSlide(index * slidesPerMove);
        this.unblockAutoplay(e, this.paginationItems[index]);
      }}"><span class="${cx(
        "h-4 w-4 block border sd-6-22-0-carousel__pager-dot-border-width rounded-full transition-colors duration-slow hover:duration-fast ease-in-out",
        this.inverted ? "sd-6-22-0-carousel__pager-dot--inverted-border hover:border-primary-200" : "border-primary hover:border-primary-500",
        isActive && "border-none",
        isActive ? this.inverted ? "sd-6-22-0-carousel__pager-dot--inverted-background hover:sd-6-22-0-carousel__pager-dot--inverted--hovered-background" : "sd-6-22-0-carousel__pager-dot-background hover:bg-accent-550" : ""
      )}"></span></button>`;
    })}</div>` : html`<span part="pagination-number" class="carousel__pagination number flex gap-0.5 cursor-default select-none" aria-controls="scroll-container"><span part="pagination-item" class="${cx(
      "w-5 text-center border-b-2",
      this.inverted ? "text-white sd-6-22-0-carousel--active--inverted-color-border" : "text-black sd-6-22-0-carousel--active-color-border"
    )}">${currentPage}</span> <span part="pagination-divider" class="${cx("scale-y-[1.5]", "text-center", this.inverted ? "text-white" : "text-black")}">/</span> <span part="pagination-item" class="${cx("w-5 text-center", this.inverted ? "text-white" : "text-black")}">${pagesCount}</span></span>`} <button part="navigation-button navigation-button--next" id="carousel__navigation-button--next" ?disabled="${!nextEnabled ? true : false}" class="${cx(
      "!ml-6 !rounded-sm sd-interactive transition-colors duration-fast ease-in-out",
      !nextEnabled && "sd-interactive--disabled",
      this.inverted ? "sd-interactive--inverted" : "sd-interactive--reset"
    )}" aria-label="${this.localize.term("nextSlide")}" aria-controls="scroll-container" aria-disabled="${nextEnabled ? "false" : "true"}" @click="${nextEnabled ? (e) => {
      this.next();
      this.unblockAutoplay(e, this.nextButton);
    } : null}"><slot name="next-icon"><sd-6-22-0-icon class="${cx("h-6 w-6 rotate-90 grid place-items-center")}" library="_internal" name="${isLtr ? "chevron-up" : "chevron-down"}"></sd-6-22-0-icon></slot></button></div></div></div>`;
  }
};
SdCarousel.styles = [
  ...SolidElement.styles,
  css`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer theme,base,components,utilities;
:host{--slide-gap:var(--sl-spacing-medium, 1rem);--scroll-hint:0px;display:flex}.carousel{grid-template-areas:'. slides .' '. pagination .'}.carousel__pagination{grid-area:pagination}.carousel__slides{grid-area:slides;scrollbar-width:none;--slide-size:calc((100% - (var(--slides-per-page) - 1) * var(--slide-gap)) / var(--slides-per-page));grid-auto-columns:var(--slide-size);-moz-column-gap:var(--slide-gap);column-gap:var(--slide-gap);scroll-padding-inline:var(--scroll-hint);padding-inline:var(--scroll-hint)}.carousel__slides::-webkit-scrollbar{display:none}[part=autoplay-controls]{z-index:1}:host([fade]){--carousel-height:auto}:host([fade]) .carousel__slides{position:relative;display:block;overflow:hidden;height:var(--carousel-height)}@media (prefers-reduced-motion){:where(.carousel__slides){scroll-behavior:auto}}.carousel__navigation{grid-area:navigation}sd-6-22-0-button::part(label){pointer-events:none;display:flex;flex:auto;align-items:center}`
];
__decorateClass([
  query('[part~="autoplay-controls"]')
], SdCarousel.prototype, "autoplayControls", 2);
__decorateClass([
  query('[part~="navigation-button--previous"]')
], SdCarousel.prototype, "previousButton", 2);
__decorateClass([
  query('[part~="navigation-button--next"]')
], SdCarousel.prototype, "nextButton", 2);
__decorateClass([
  queryAll('[part~="pagination-item"]')
], SdCarousel.prototype, "paginationItems", 2);
__decorateClass([
  property({ type: String, reflect: true })
], SdCarousel.prototype, "variant", 2);
__decorateClass([
  property({ type: Boolean, reflect: true })
], SdCarousel.prototype, "inverted", 2);
__decorateClass([
  property({ type: Boolean, reflect: true })
], SdCarousel.prototype, "loop", 2);
__decorateClass([
  property({ type: Boolean, reflect: true })
], SdCarousel.prototype, "autoplay", 2);
__decorateClass([
  property({ type: Number, attribute: "autoplay-interval", reflect: true })
], SdCarousel.prototype, "autoplayInterval", 2);
__decorateClass([
  property({ type: Boolean, reflect: true })
], SdCarousel.prototype, "fade", 2);
__decorateClass([
  property({ type: Number, attribute: "slides-per-page", reflect: true })
], SdCarousel.prototype, "slidesPerPage", 2);
__decorateClass([
  property({ type: Number, attribute: "slides-per-move", reflect: true })
], SdCarousel.prototype, "slidesPerMove", 2);
__decorateClass([
  query("slot:not([name])")
], SdCarousel.prototype, "defaultSlot", 2);
__decorateClass([
  query(".carousel__slides")
], SdCarousel.prototype, "scrollContainer", 2);
__decorateClass([
  query(".carousel__pagination")
], SdCarousel.prototype, "paginationContainer", 2);
__decorateClass([
  query(".carousel__announcement")
], SdCarousel.prototype, "announcementRegion", 2);
__decorateClass([
  state()
], SdCarousel.prototype, "activeSlide", 2);
__decorateClass([
  state()
], SdCarousel.prototype, "currentPage", 2);
__decorateClass([
  state()
], SdCarousel.prototype, "pausedAutoplay", 2);
__decorateClass([
  state()
], SdCarousel.prototype, "isFocused", 2);
__decorateClass([
  watch("pausedAutoplay")
], SdCarousel.prototype, "handlePausedAutoplay", 1);
__decorateClass([
  watch("fade", { waitUntilFirstUpdate: true })
], SdCarousel.prototype, "handleFadeChange", 1);
__decorateClass([
  watch("loop", { waitUntilFirstUpdate: true }),
  watch("slidesPerPage", { waitUntilFirstUpdate: true })
], SdCarousel.prototype, "initializeSlides", 1);
__decorateClass([
  watch("activeSlide")
], SdCarousel.prototype, "handleSlideChange", 1);
__decorateClass([
  watch("slidesPerMove")
], SdCarousel.prototype, "handleSlidesPerMoveChange", 1);
__decorateClass([
  watch("autoplay")
], SdCarousel.prototype, "handleAutoplayChange", 1);
__decorateClass([
  watch("autoplayInterval")
], SdCarousel.prototype, "handleautoplayIntervalChange", 1);
SdCarousel = __decorateClass([
  customElement("sd-6-22-0-carousel")
], SdCarousel);

export {
  SdCarousel
};
