'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

const index = require('./index-b499856a.js');

/**
 * This type encapsulates values to be used for
 * variants, contrasts etc. It aims to be generic
 * enough to be used in several different circumstances
 * where values such as 'low' or 'light' does not make
 * sense.
 */
const Force = {
  WEAK: 'weak',
  MEDIUM: 'medium',
  STRONG: 'strong',
};
Object.values(Force);

const teliaDividerCss = ".telia-divider{border-bottom:calc(0.1rem * var(--voca-rem-multiplier)) solid rgba(0, 0, 0, 0.15);height:0;}.telia-divider--dark-bg-weak{border-bottom:calc(0.1rem * var(--voca-rem-multiplier)) solid rgba(255, 255, 255, 0.15)}.telia-divider--light-bg-weak{border-bottom:calc(0.1rem * var(--voca-rem-multiplier)) solid rgba(0, 0, 0, 0.15)}.telia-divider--dark-bg-medium{border-bottom:calc(0.1rem * var(--voca-rem-multiplier)) solid rgba(255, 255, 255, 0.3)}.telia-divider--light-bg-medium{border-bottom:calc(0.1rem * var(--voca-rem-multiplier)) solid rgba(0, 0, 0, 0.3)}.telia-divider--dark-bg-strong{border-bottom:calc(0.1rem * var(--voca-rem-multiplier)) solid rgba(255, 255, 255, 0.5)}.telia-divider--light-bg-strong{border-bottom:calc(0.1rem * var(--voca-rem-multiplier)) solid rgba(0, 0, 0, 0.5)}";

const TeliaDivider = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
    /**
     * The contrast of the divider against the background.
     */
    this.variant = Force.WEAK;
    /**
     * When used on a dark background, set this
     * property to true. The color of the divider will
     * change to something suitable on a dark background.
     */
    this.darkBackground = false;
    /** Tracking id is used to identify and count Component usage */
    this.dataTrackingId = 'telia-divider';
    this.baseClass = 'telia-divider';
  }
  getAppearenceClass() {
    return `${this.baseClass}--${this.darkBackground ? 'dark-bg' : 'light-bg'}-${this.variant}`;
  }
  render() {
    const classes = {
      [`${this.baseClass}`]: true,
      [this.getAppearenceClass()]: true,
    };
    return (index.h("div", { class: classes, "data-testid": this.dataTestid }, index.h("telia-vst", { dataTrackingId: this.dataTrackingId })));
  }
};
TeliaDivider.style = teliaDividerCss;

exports.telia_divider = TeliaDivider;
