{"version":3,"sources":["../src/elements/carousel-total.ts"],"sourcesContent":["import { html, css, LitElement } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport type KemetCarousel from './carousel';\n\n/**\n *\n * @since 1.1.0\n * @status stable\n *\n * @tagname kemet-carousel-total\n * @summary Displays the total slide number.\n *\n * @prop {number} total - The total number of slides.\n *\n */\n\n@customElement('kemet-carousel-total')\nexport default class KemetCarouselTotal extends LitElement {\n  static styles = [\n    css`\n      :host {\n        display: inline-block;\n      }\n    `,\n  ];\n\n  @property({ type: Number })\n  total: number | undefined;\n\n  @state()\n  carousel: KemetCarousel | null;\n\n  firstUpdated() {\n    this.carousel = this.closest('kemet-carousel');\n  }\n\n  updated() {\n    this.total = this.carousel?.total;\n  }\n\n  render() {\n    return html`${this.total}`;\n  }\n}\n\ndeclare global {\n  interface HTMLElementTagNameMap {\n    'kemet-carousel-total': KemetCarouselTotal\n  }\n}\n"],"mappings":";;;;;AAAA,SAAS,MAAM,KAAK,kBAAkB;AACtC,SAAS,eAAe,UAAU,aAAa;AAgB/C,IAAqB,qBAArB,cAAgD,WAAW;AAAA,EAezD,eAAe;AACb,SAAK,WAAW,KAAK,QAAQ,gBAAgB;AAAA,EAC/C;AAAA,EAEA,UAAU;AACR,SAAK,QAAQ,KAAK,UAAU;AAAA,EAC9B;AAAA,EAEA,SAAS;AACP,WAAO,OAAO,KAAK,KAAK;AAAA,EAC1B;AACF;AA1BqB,mBACZ,SAAS;AAAA,EACd;AAAA;AAAA;AAAA;AAAA;AAKF;AAGA;AAAA,EADC,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GATP,mBAUnB;AAGA;AAAA,EADC,MAAM;AAAA,GAZY,mBAanB;AAbmB,qBAArB;AAAA,EADC,cAAc,sBAAsB;AAAA,GAChB;","names":[]}