1import{i as e,g as t,d as r,A as s,x as i,b as a,e as o,v as n}from"./pp-accordion-CA6w9In6.js";import{o as d}from"./pp-facet-dropdown-FY1eeaHH.js";import{p as l}from"./pp-highcharts-D5Crk9o0.js";class h extends e{static get properties(){return{checked:{type:Boolean,reflect:!0},checkboxId:{type:String,attribute:"checkbox-id"},labelSrOnly:{type:Boolean,attribute:"label-sronly"},requiredText:{type:String,attribute:"required-text"},name:{type:String},value:{type:String},errormessage:{type:String},errorid:{type:String},required:{type:Boolean},autofocus:{type:Boolean},group:{type:String}}}constructor(){super(),this.value=null,this.errormessage=null,this.errorid=null,this.required=!1,this.group=null,this._children=t(this,["pp-text-inline","pp-text-info"]),this.checked=!1,this.labelSrOnly=!1,this.requiredText="Pflichtangabe",this._children["pp-text-info"]&&(this.infoTextId=`info-${r()}`)}firstUpdated(){this.group&&window.addEventListener(l,this.toggleChecked.bind(this))}toggleChecked(e){const{active:t}=e.detail;this.checked=t}get statusClassMap(){return{"border-static-1":!this.errormessage,"border-static-4":this.errormessage}}get labelClasses(){return{"sr-only":this.labelSrOnly,"mb-20":!this._children?.["pp-text-info"]}}get borderAndPaddingClasses(){return{"border-static-4":this.errormessage,"border-2":this.errormessage,"pt-20":this.errormessage,"px-20":this.errormessage}}get errorTmpl(){return this.errormessage?a` 2 <div class="w-full mb-20"> 3 ${i(this.errormessage,this.errorid)} 4 </div>`:s}get infoText(){return this._children?.["pp-text-info"]?a` 5 <div id="${this.infoTextId}" class="text-16 text-static-2 mb-20"> 6 ${this._children["pp-text-info"]} 7 </div> 8 `:s}get describedBy(){const e=[this.infoTextId,this.errorid].filter(Boolean).join(" ");return""===e?void 0:e}render(){return a` 9 <div class="flex mt-0 ${o(this.borderAndPaddingClasses)}"> 10 <label 11 class="${o(this.labelClasses)} relative pl-32 cursor-pointer typ-body-4 text-static-2 text-left s-editor" 12 for="${this.checkboxId}" 13 > 14 <input type="checkbox" 15 id="${this.checkboxId}" 16 name="${this.name}" 17 ?autofocus="${this.autofocus}" 18 class="opacity-0 absolute cursor-pointer" 19 aria-describedby="${d(this.describedBy)}" 20 ?required="${this.required}" 21 value="${d(this.value)?this.value:void 0}" 22 ?checked="${this.checked}" 23 /> 24 <span 25 class="${o(this.statusClassMap)} checkmark absolute top-0 left-0 h-24 w-24 bg-static-22 border-2 transition duration-200 ease-in-out after:absolute after:h-12 after:w-12 after:transition after:duration-200 after:ease-in-out after:left-4 after:top-4 after:opacity-0 after:hidden" 26 ></span> 27 ${this._children?.["pp-text-inline"]} 28 ${n(this.required,this.requiredText)} 29 ${this.infoText} 30 </label> 31 </div> 32 ${this.errorTmpl} 33 `}createRenderRoot(){return this}}customElements.define("pp-checkbox",h);export{h as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.