var __decorate=this&&this.__decorate||function(e,r,o,t){var d,n=arguments.length,l=n<3?r:null===t?t=Object.getOwnPropertyDescriptor(r,o):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,r,o,t);else for(var s=e.length-1;s>=0;s--)(d=e[s])&&(l=(n<3?d(l):n>3?d(r,o,l):d(r,o))||l);return n>3&&l&&Object.defineProperty(r,o,l),l};import{css as e,html as r,LitElement as o}from"lit";import{customElement as t,property as d}from"lit/decorators.js";let styles=e`
    * {
        box-sizing: border-box;
    }
    :host {
        width: 100%;
        height: var(--or-tree-node-height, 44px);
        padding: 6px 12px 6px var(--or-tree-node-indent, 24px);
        background: var(--or-tree-node-background, transparent);
        border-left: 4px solid transparent;
        display: flex;
        align-items: center;
        gap: var(--or-tree-node-gap, 8px);
        overflow: hidden;
        user-select: none;
        --or-icon-width: 20px;
    }

    :host(:not([readonly])) {
        cursor: pointer;
    }
    
    :host([readonly]) {
        cursor: not-allowed;
    }

    :host(:not([readonly]):hover) {
        background: var(--or-tree-node-backgrond--hovered, #f8f9fa);
    }
    
    :host([selected]) {
        background: var(--or-tree-node-background--selected, #f1f3f5);
        border-left: 4px solid var(--or-tree-node-color--selected, var(--or-app-color4, #4d9d2a));
    }

    ::slotted(*:not([slot])) {
        flex: 1;
    }
`,OrTreeNode=class extends o{constructor(){super(...arguments),this.readonly=!1,this.selected=!1}static get styles(){return[styles]}render(){return r`
            <slot name="prefix"></slot>
            <slot></slot>
            <slot name="suffix"></slot>
        `}};__decorate([d({type:Boolean,reflect:!0})],OrTreeNode.prototype,"readonly",void 0),__decorate([d({type:Boolean,reflect:!0})],OrTreeNode.prototype,"selected",void 0),OrTreeNode=__decorate([t("or-tree-node")],OrTreeNode);export{OrTreeNode};