'use strict';

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

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

const bsFieldDetailsCss = ".bs-field-details{display:flex;justify-content:space-between;align-items:flex-start;gap:var(--bs-space-2);padding:0 0.75rem;margin-top:0.5rem}:where(textarea,bs-textarea)+.bs-field-details{margin-top:0.25rem}.bs-field-details :where(.bs-character-count:first-child){margin-left:auto}.bs-hint{--hint-color:var(--bs-ink-light);min-width:0;color:var(--hint-color);font-size:var(--bs-text-xs);padding:0;margin:0;list-style:none;overflow-wrap:break-word}.bs-hint:where([data-error]){--hint-color:var(--bs-ink-red)}";

const BsFieldDetails = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
    this.charCount = undefined;
    this.charMax = undefined;
    this.error = undefined;
    this.errorMsg = undefined;
    this.hint = undefined;
    this.hintId = undefined;
  }
  get hintMsg() {
    return this.errorMsg || this.hint || undefined;
  }
  render() {
    return (index.h(index.Host, { class: "bs-field-details" }, this.hintMsg && (index.h("span", { id: this.hintId, class: "bs-hint", "data-error": this.error || undefined }, this.hintMsg)), this.charMax && (index.h("span", { class: "bs-character-count", "data-error": (this.charCount > this.charMax) || undefined }, this.charCount || '0', " / ", this.charMax))));
  }
};
BsFieldDetails.style = bsFieldDetailsCss;

exports.bs_field_details = BsFieldDetails;

//# sourceMappingURL=bs-field-details.cjs.entry.js.map