import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-0b18a276.js';

const DatatableBodyRow = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
        this.selected = false;
        this.selectRow = createEvent(this, "selectRow", 7);
        this.expand = createEvent(this, "expand", 7);
    }
    watchSelected() {
        this.selectRow.emit(this.selected);
    }
    handleClick() {
        if (this.selectable) {
            this.selected = !this.selected;
        }
    }
    toggleExpendable(e) {
        e.stopPropagation();
        this.expended = !this.expended;
        this.expand.emit(this.expended);
    }
    render() {
        return h(Host, { class: {
                'dense': this.dense,
                'selectable': this.selectable,
                'selected': this.selected,
                'expended': this.expended
            }, onClick: () => this.handleClick() }, h("div", { class: "container" }, h("div", { class: "mdc-ripple-surface mdc-ripple-surface--primary" }), this.expendable &&
            h("materials-icon-button", { dense: true, icon: this.expended ? 'arrow_drop_down' : 'arrow_right', onClick: (e) => this.toggleExpendable(e) }), this.selectable &&
            h("materials-checkbox", { class: "selection-checkbox", color: "primary", onChange: () => {
                    this.selected = !this.selected;
                }, onClick: (e) => e.stopPropagation(), checked: this.selected }), h("slot", null)), h("div", { class: "expendable-content" }, h("slot", { name: "expendable-content" })));
    }
    get host() { return getElement(this); }
    static get watchers() { return {
        "selected": ["watchSelected"]
    }; }
    static get style() { return "\@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));}}\@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));}}\@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0;}to{opacity:var(--mdc-ripple-fg-opacity,0);}}\@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0;}to{opacity:var(--mdc-ripple-fg-opacity,0);}}\@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity,0);}to{opacity:0;}}\@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity,0);}to{opacity:0;}}.mdc-ripple-surface--test-edge-var-bug{--mdc-ripple-surface-test-edge-var:1px solid #000;visibility:hidden;}.mdc-ripple-surface--test-edge-var-bug::before{border:var(--mdc-ripple-surface-test-edge-var);}.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0,0,0,0);position:relative;outline:none;overflow:hidden;}.mdc-ripple-surface::before,.mdc-ripple-surface::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\"\";}.mdc-ripple-surface::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;}.mdc-ripple-surface.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1));}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center;}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0);}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));}.mdc-ripple-surface::before,.mdc-ripple-surface::after{background-color:#000;}.mdc-ripple-surface:hover::before{opacity:0.04;}.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before,.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:0.12;}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear;}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:0.12;}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:0.12;}.mdc-ripple-surface::before,.mdc-ripple-surface::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%;}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%);}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]{overflow:visible;}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%;}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%);}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%);}.mdc-ripple-surface--primary::before,.mdc-ripple-surface--primary::after{background-color:#6200ee;}\@supports not (-ms-ime-align:auto){.mdc-ripple-surface--primary::before,.mdc-ripple-surface--primary::after{background-color:var(--mdc-theme-primary,#6200ee);}}.mdc-ripple-surface--primary:hover::before{opacity:0.04;}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):focus::before,.mdc-ripple-surface--primary.mdc-ripple-upgraded--background-focused::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:0.12;}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear;}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:0.12;}.mdc-ripple-surface--primary.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:0.12;}.mdc-ripple-surface--accent::before,.mdc-ripple-surface--accent::after{background-color:#018786;}\@supports not (-ms-ime-align:auto){.mdc-ripple-surface--accent::before,.mdc-ripple-surface--accent::after{background-color:var(--mdc-theme-secondary,#018786);}}.mdc-ripple-surface--accent:hover::before{opacity:0.04;}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):focus::before,.mdc-ripple-surface--accent.mdc-ripple-upgraded--background-focused::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:0.12;}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear;}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:0.12;}.mdc-ripple-surface--accent.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:0.12;}:host{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-family:Roboto,sans-serif;border-bottom:1px solid #e0e0e0;padding-left:8px;}:host .container{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;width:100%;}:host(:hover){background-color:#f9f9f9;}:host(.odd){background-color:var(--mdc-theme-datatable-even-color,#FCFCFC);}:host(.selectable){cursor:pointer;}:host(.selected){background-color:var(--mdc-theme-primary-50,#d2c2fd);border-bottom:1px solid var(--mdc-theme-primary-100,#d2c2fd);}:host(.dense) .container{height:42px;}.expendable-content{display:none;border-top:1px solid #ececec;}:host(.expended) .expendable-content{display:block;}"; }
};

export { DatatableBodyRow as materials_datatable_body_row };
