import a from "./Checkbox.js";
import { resolveComponent as n, openBlock as l, createElementBlock as i, normalizeClass as c, createBlock as d, createCommentVNode as m, renderSlot as b } from "vue";
import { _ as r } from "./_plugin-vue_export-helper-CHgC5LLL.js";
const f = "_item_5of0G", h = "_checkbox_hPcLD", k = {
  item: f,
  "is-selectable": "_is-selectable_6vDyg",
  "not-actionable": "_not-actionable_w420U",
  checkbox: h
}, _ = {
  name: "ll-list-item",
  components: {
    "ll-checkbox": a
  },
  props: {
    /**
     * The item to be selected
     */
    item: {
      type: Object,
      default: () => ({})
    },
    /**
     * Whether this row can be selected.
     */
    isSelectable: {
      type: Boolean,
      default: !1
    },
    /**
     * Whether this row's checkbox should be indeterminite
     */
    isIndeterminate: {
      type: Boolean,
      default: !1
    },
    /**
     * Whether this row has an actions column or not. By default list items will
     * be styled to include actions. Use `not-actionable` to restyle a row that
     * has no actions.
     */
    notActionable: {
      type: Boolean,
      default: !1
    },
    /**
     * Whether this row is selected.
     */
    selected: {
      type: Boolean,
      default: !1
    },
    /**
     * Disables the checkbox
     */
    disabled: {
      type: Boolean,
      default: !1
    }
  },
  emits: ["select"],
  methods: {
    /**
     * @param {boolean} value emit change event when item is selected
     */
    onSelect(e) {
      this.$emit("select", { item: this.item, value: e });
    }
  }
};
function u(e, p, t, B, x, o) {
  const s = n("ll-checkbox");
  return l(), i("li", {
    class: c(["shadow-low", [e.$style.item, { [e.$style["is-selectable"]]: t.isSelectable, [e.$style["not-actionable"]]: t.notActionable }]])
  }, [
    t.isSelectable ? (l(), d(s, {
      key: 0,
      "data-test": "checkbox|select-item",
      checked: t.selected,
      class: c(e.$style.checkbox),
      disabled: t.disabled || null,
      indeterminate: t.isIndeterminate,
      "onUpdate:checked": o.onSelect
    }, null, 8, ["checked", "class", "disabled", "indeterminate", "onUpdate:checked"])) : m("", !0),
    b(e.$slots, "default")
  ], 2);
}
const y = {
  $style: k
}, w = /* @__PURE__ */ r(_, [["render", u], ["__cssModules", y]]);
export {
  w as default
};
//# sourceMappingURL=ListItem.js.map
