import { r as registerInstance, h, H as Host, g as getElement, F as Fragment } from './index-e582ed08.js';

const klevuListCss = ":host{display:block}.container{display:flex;padding:var(--klevu-spacing-03) var(--klevu-spacing-05)}a{display:flex;text-decoration:none;padding:var(--klevu-spacing-03) var(--klevu-spacing-05)}.condensed{padding:0 var(--klevu-spacing-04)}.noXPadding{padding-left:0;padding-right:0}.text{display:flex;flex-direction:column}.icon{font-size:20px;margin-right:var(--klevu-spacing-03)}.image{max-width:48px;margin-right:var(--klevu-spacing-03);border-radius:var(--klevu-border-radius-xxl)}";

var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
  if (kind === "a" && !f)
    throw new TypeError("Private accessor was defined without a getter");
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
    throw new TypeError("Cannot read private member from an object whose class did not declare it");
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
};
var _KlevuList_instances, _KlevuList_getContent;
const KlevuList = class {
  constructor(hostRef) {
    registerInstance(this, hostRef);
    _KlevuList_instances.add(this);
    this.icon = undefined;
    this.image = undefined;
    this.url = undefined;
    this.condensed = false;
    this.noXPadding = false;
    this.primaryText = "";
    this.secondaryText = "";
  }
  render() {
    return (h(Host, null, h("div", { part: "list-base" }, Boolean(this.url) ? (h("a", { class: {
        condensed: this.condensed,
        noXPadding: this.noXPadding,
      }, href: this.url }, __classPrivateFieldGet(this, _KlevuList_instances, "m", _KlevuList_getContent).call(this))) : (h("div", { class: {
        container: true,
        condensed: this.condensed,
        noXPadding: this.noXPadding,
      } }, __classPrivateFieldGet(this, _KlevuList_instances, "m", _KlevuList_getContent).call(this))))));
  }
  get el() { return getElement(this); }
};
_KlevuList_instances = new WeakSet(), _KlevuList_getContent = function _KlevuList_getContent() {
  return (h(Fragment, null, this.icon && h("klevu-icon", { part: "list-icon", class: "icon", name: this.icon }), this.image && h("img", { part: "list-image", class: "image", src: this.image }), h("div", { class: "text", part: "list-content" }, h("slot", { name: "primary" }, this.primaryText && h("klevu-typography", { variant: "body-s" }, this.primaryText)), h("slot", { name: "secondary" }, this.secondaryText && (h("klevu-typography", { variant: "body-s", style: {
      "--klevu-typography-color": "var(--klevu-color-neutral-7)",
    } }, this.secondaryText)))), h("span", { part: "list-button" }, h("slot", { name: "button" }))));
};
KlevuList.style = klevuListCss;

export { KlevuList as klevu_list };

//# sourceMappingURL=klevu-list.entry.js.map