import{r as a,c as e,h as c,g as t}from"./p-cdf3f581.js";const r=class{constructor(c){a(this,c),this.calciteHandleNudge=e(this,"calciteHandleNudge",7),this.activated=!1,this.textTitle="handle",this.handleKeyDown=a=>{switch(a.key){case" ":this.activated=!this.activated;break;case"ArrowUp":case"ArrowDown":if(!this.activated)return;const e=a.key.toLowerCase().replace("arrow","");this.calciteHandleNudge.emit({handle:this.el,direction:e})}},this.handleBlur=()=>{this.activated=!1}}async setFocus(){this.handleButton.focus()}render(){return c("span",{role:"button",tabindex:"0","aria-pressed":this.activated.toString(),class:{handle:!0,"handle--activated":this.activated},onKeyDown:this.handleKeyDown,onBlur:this.handleBlur,title:this.textTitle,ref:a=>{this.handleButton=a}},c("calcite-icon",{scale:"s",icon:"drag"}))}get el(){return t(this)}};r.style=":host([hidden]){display:none}:host([theme=dark]){--calcite-app-background:#404040;--calcite-app-foreground:#dfdfdf;--calcite-app-background-hover:#2b2b2b;--calcite-app-foreground-hover:#f3f3f3;--calcite-app-background-active:#151515;--calcite-app-foreground-active:#59d6ff;--calcite-app-foreground-subtle:#eaeaea;--calcite-app-background-content:#2b2b2b;--calcite-app-border:#2b2b2b;--calcite-app-border-hover:#2b2b2b;--calcite-app-border-subtle:#2b2b2b;--calcite-app-scrim:rgba(64, 64, 64, 0.8)}:host([theme=light]){--calcite-app-background:#ffffff;--calcite-app-foreground:#404040;--calcite-app-background-hover:#eaeaea;--calcite-app-foreground-hover:#2b2b2b;--calcite-app-background-active:#c7eaff;--calcite-app-foreground-active:#00619b;--calcite-app-foreground-subtle:#757575;--calcite-app-foreground-link:#007ac2;--calcite-app-background-content:#f3f3f3;--calcite-app-background-clear:transparent;--calcite-app-border:#eaeaea;--calcite-app-border-hover:#dfdfdf;--calcite-app-border-subtle:#f3f3f3;--calcite-app-border-active:#00619b;--calcite-app-disabled-opacity:0.25;--calcite-app-scrim:rgba(255, 255, 255, 0.8)}:host{display:flex}.handle{display:flex;align-items:center;align-self:stretch;justify-content:center;padding:var(--calcite-app-cap-spacing-three-quarters) var(--calcite-app-side-spacing-quarter);background-color:var(--calcite-app-background);background-color:transparent;border:none;color:var(--calcite-app-border);line-height:0;cursor:move;outline-offset:0;outline-color:transparent;transition:outline-offset var(--calcite-app-animation-time-fast) ease-in-out, outline-color var(--calcite-app-animation-time-fast) ease-in-out}.handle:hover{background-color:var(--calcite-app-background-hover);color:var(--calcite-app-foreground)}.handle:focus{color:var(--calcite-app-foreground);outline:2px solid var(--calcite-ui-blue-1);outline-offset:-2px}.handle--activated{background-color:var(--calcite-app-background-active);color:var(--calcite-app-foreground-active)}";export{r as calcite_handle}