import{r as e,c as t,h as o,H as r,g as i}from"./p-7e7de1d6.js";import{c as n}from"./p-0b77685e.js";const a=':where(*:not(slot),*:not(slot)::before,*:not(slot)::after){-webkit-box-sizing:border-box;box-sizing:border-box}:where(*:not(slot)){margin:0}:where(img,picture,video,canvas,svg){display:block;max-width:100%}:where(input,button,textarea,select){font:inherit}:where(p,h1,h2,h3,h4,h5,h6){overflow-wrap:break-word}:where(a:not([href]):not([class])){color:currentColor;text-decoration:none}:where(a:not([href]):not([class]):hover){color:currentColor;text-decoration:none}:where(ul[role=list],ol[role=list]){list-style:none}:where(table){border-collapse:collapse;border-spacing:0}:where(*:not(slot)){font-family:var(--pine-font-family-body), -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", "Roboto", "Ubuntu", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"}:where(h1,h2,h3,h4,h5,h6){font-family:var(--pine-font-family-heading);color:var(--pine-color-grey-950)}:where(h1){font:var(--pine-typography-heading-h1);letter-spacing:var(--pine-letter-spacing-heading-h1)}:where(h2){font:var(--pine-typography-heading-h2);letter-spacing:var(--pine-letter-spacing-heading-h2)}:where(h3){font:var(--pine-typography-heading-h3);letter-spacing:var(--pine-letter-spacing-heading-h3)}:where(h4){font:var(--pine-typography-heading-h4);letter-spacing:var(--pine-letter-spacing-heading-h4)}:where(h5){font:var(--pine-typography-heading-h5);letter-spacing:var(--pine-letter-spacing-heading-h5)}:where(h6){font:var(--pine-typography-heading-h6);letter-spacing:var(--pine-letter-spacing-heading-h6)}:where(p){font:var(--pine-typography-body-md-default);letter-spacing:var(--pine-letter-spacing-body-md)}:where(code,kbd,pre,samp){font-family:monospace}:where([role=button]){cursor:pointer}:where(:focus){outline:0}:where(:focus-visible){outline:var(--pine-border-width-thick) solid var(--pine-color-purple-500)}:where([hidden]){display:none !important}';const h=a;const s=":host{--border-head-default:var(--pine-border-width-thin) solid var(--pine-color-grey-300);--color-background-fixed:var(--pine-color-base-white);border-color:inherit;-webkit-box-sizing:border-box;box-sizing:border-box;display:table-header-group;vertical-align:middle}:host::part(checkbox-cell){background-color:var(--color-background-fixed);left:0;position:-webkit-sticky;position:sticky;z-index:1}:host pds-table-checkbox-cell{-webkit-border-after:var(--border-head-default);border-block-end:var(--border-head-default)}";const l=s;const c=class{constructor(o){e(this,o);this.pdsTableSelectAll=t(this,"pdsTableSelectAll",7);this.generateUniqueId=()=>{const e=Math.random().toString(36).substring(2,8);const t=(new Date).toISOString().replace(/[:.]/g,"-");const o=`${e}-${t}`;return o};this.handleInput=e=>{this.isSelected=!e.target.checked;this.handleSelect(this.isSelected)};this.handleSelect=e=>{this.indeterminate=false;if(n("pds-table-head",this.hostElement)){this.pdsTableSelectAll.emit({isSelected:e})}};this.indeterminate=undefined;this.isSelected=undefined}componentWillLoad(){if(this.isSelected){this.handleSelect(this.isSelected)}}componentWillRender(){this.tableRef=this.hostElement.closest("pds-table");if(this.tableRef&&this.tableRef.fixedColumn){const e=this.hostElement.querySelector("pds-table-head-cell:first-child");e===null||e===void 0?void 0:e.classList.add("is-fixed")}}render(){return o(r,{key:"213f85bc482cf8f137acccd858dbd0e207eef425",role:"row"},this.tableRef&&this.tableRef.selectable&&o("pds-table-head-cell",{key:"1633990c5a5e9eb5786754c5f0013ebe5619bf8e",part:this.tableRef.selectable?"checkbox-cell":""},o("pds-checkbox",{key:"d3ff182cfe34e11c04e66964dc295d9654e48cfd",componentId:this.generateUniqueId(),indeterminate:this.indeterminate,onInput:this.handleInput,label:"Select All Rows",labelHidden:true,checked:this.isSelected})),o("slot",{key:"149366f9587c8fe0c6040abca3a8fc4195fc312a"}))}get hostElement(){return i(this)}};c.style=h+l;export{c as pds_table_head};
//# sourceMappingURL=p-889b29d1.entry.js.map