System.register(["./p-7a5d5d62.system.js"],(function(i){"use strict";var t,a,e,s,r;return{setters:[function(i){t=i.r;a=i.c;e=i.h;s=i.H;r=i.g}],execute:function(){var o=":host{--background-fixed:var(--pine-color-base-white);--border:var(--pine-border-default);--box-shadow:3px 3px 6px -2px rgba(0, 0, 0, 0.1);--color-sorting:var(--pine-color-neutral-charcoal-500);--color:var(--pine-color-neutral-charcoal-200);--fixed-cell-position:0;--font-size:var(--pine-font-size-body-sm);--font-weight:var(--pine-font-weight-medium);--line-height:var(--pine-line-height-sm);--margin-arrow:var(--pine-spacing-xxs);--padding-arrow:calc(var(--pine-spacing-xxs) / 2);--padding-compact:var(--pine-spacing-xxs);--padding:calc(var(--pine-spacing-md) / 2);-webkit-border-after:var(--border);border-block-end:var(--border);color:var(--color);display:table-cell;font-size:var(--font-size);font-style:normal;font-weight:var(--font-weight);line-height:var(--line-height);padding:var(--padding);text-align:start;vertical-align:inherit}:host(.is-compact){padding-block:var(--padding-compact)}:host(.is-fixed){background:var(--background-fixed);left:var(--fixed-cell-position);position:-webkit-sticky;position:sticky;z-index:1}:host(.has-scrolled.is-fixed){-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow)}:host(.is-sortable){cursor:pointer}:host(.is-sortable) pds-icon{-webkit-margin-start:var(--margin-arrow);margin-inline-start:var(--margin-arrow);-webkit-padding-before:var(--padding-arrow);padding-block-start:var(--padding-arrow);position:absolute}:host(.is-sortable:hover),:host(.is-active){color:var(--color-sorting)}";var n=o;var c=i("pds_table_head_cell",function(){function i(i){var e=this;t(this,i);this.pdsTableSort=a(this,"pdsTableSort",7);this.handleScroll=function(){if(e.tableRef.scrollLeft>0){e.tableScrolling=true}else{e.tableScrolling=false}};this.toggleSort=function(){if(e.sortable){var i=e.hostElement.innerText.trim();e.sortingDirection=e.sortingDirection==="asc"?"desc":"asc";e.tableRef.querySelectorAll("pds-table-head-cell").forEach((function(i){i.classList.remove("is-active")}));e.hostElement.classList.toggle("is-active");e.pdsTableSort.emit({column:i,direction:e.sortingDirection})}};this.sortable=undefined;this.sortingDirection="asc";this.tableScrolling=false}i.prototype.componentWillRender=function(){this.tableRef=this.hostElement.closest("pds-table")};i.prototype.componentDidLoad=function(){if(this.tableRef&&this.tableRef.responsive&&this.tableRef.fixedColumn){this.tableRef.addEventListener("scroll",this.handleScroll)}};i.prototype.classNames=function(){var i=[];if(this.tableRef&&this.tableRef.compact){i.push("is-compact")}if(this.sortable){i.push("is-sortable")}if(this.sortable&&this.sortingDirection!==null){i.push("sort-"+this.sortingDirection)}if(this.tableRef&&this.tableRef.fixedColumn&&this.tableScrolling){i.push("has-scrolled")}return i.join("  ")};i.prototype.render=function(){return e(s,{key:"855185382f83a8434abb9b1ccf222c8ef47e399a",class:this.classNames(),role:"columnheader",onClick:this.toggleSort,style:this.tableRef&&this.tableRef.fixedColumn&&this.tableRef.selectable?{"--fixed-cell-position":"40px"}:{}},e("slot",{key:"78f3f9551be753e3be9953dfa57a9924d2dd4950"}),this.sortable&&e("pds-icon",{name:this.sortingDirection==="asc"?"up-small":"down-small"}))};Object.defineProperty(i.prototype,"hostElement",{get:function(){return r(this)},enumerable:false,configurable:true});return i}());c.style=n}}}));
//# sourceMappingURL=p-ad186d12.system.entry.js.map