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