import { msg as f } from "@lit/localize/init/install";
import { css as m, LitElement as u, nothing as b, html as c } from "lit";
import { property as v } from "lit/decorators.js";
import { importMdIconButtonSafely as w, importMdIconSafely as y, customElementSafe as _ } from "./custom-element-safe.js";
var g = Object.defineProperty, x = Object.getOwnPropertyDescriptor, d = (t) => {
  throw TypeError(t);
}, p = (t, e, r, a) => {
  for (var o = a > 1 ? void 0 : a ? x(e, r) : e, i = t.length - 1, l; i >= 0; i--)
    (l = t[i]) && (o = (a ? l(e, r, o) : l(o)) || o);
  return a && o && g(e, r, o), o;
}, D = (t, e, r) => e.has(t) || d("Cannot " + r), E = (t, e, r) => e.has(t) ? d("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), P = (t, e, r) => (D(t, e, "access private method"), r), n, h;
w();
y();
let s = class extends u {
  constructor() {
    super(...arguments), E(this, n), this.closeDisabled = !1;
  }
  render() {
    return c`
      ${this.closeDisabled ? b : c`
            <div class="close-button-wrapper">
              <md-icon-button class="close-button" @click=${P(this, n, h)} aria-label=${f("close drawer", { id: "polyfea.close-drawer" })}>
                <md-icon>close_small</md-icon>
              </md-icon-button>
            </div>
          `}
      <div class="content">
        <slot></slot>
      </div>
    `;
  }
};
n = /* @__PURE__ */ new WeakSet();
h = function() {
  this.dispatchEvent(new Event("drawer-closed", { bubbles: !0, composed: !0 }));
};
s.styles = m`
  :host {
    color: var(--md-sys-color-on-surface);
    position: relative;
    display: block;
    height: 100%;
    width: 100%;
    padding: 1rem;
    overflow-y: auto;
    box-sizing: border-box;
    }

    ::-webkit-scrollbar {
    height: 4px;
    width: 4px;
    background-color: var(--highlight-10, rgba(0, 0, 0, 0.1));
    border-radius: 2px;
    }

    ::-webkit-scrollbar-thumb {
    background: var(--highlight-20, rgba(0, 0, 0, 0.2));
    border-radius: 2px;
    }

    .content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-content: start;
    justify-items: end;
    }

    .close-button-wrapper {
    display: flex;
    justify-content: flex-end;
  }`;
p([
  v({ type: Boolean, attribute: "close-disabled" })
], s.prototype, "closeDisabled", 2);
s = p([
  _("polyfea-md-drawer")
], s);
export {
  s as PolyfeaMdDrawer
};
