import s from "./picker.mjs";
class o extends s {
  constructor(e, l) {
    super(e), this.label.innerHTML = l, this.container.classList.add("ql-color-picker"), Array.from(this.container.querySelectorAll(".ql-picker-item")).slice(0, 7).forEach((t) => {
      t.classList.add("ql-primary");
    });
  }
  buildItem(e) {
    const l = super.buildItem(e);
    return l.style.backgroundColor = e.getAttribute("value") || "", l;
  }
  selectItem(e, l) {
    super.selectItem(e, l);
    const t = this.label.querySelector(".ql-color-label"), r = e && e.getAttribute("data-value") || "";
    t && (t.tagName === "line" ? t.style.stroke = r : t.style.fill = r);
  }
}
export {
  o as default
};
