import { defineComponent, useAttrs, resolveComponent, createBlock, openBlock, mergeProps, unref, createSlots, withCtx, renderSlot, normalizeProps, guardReactiveProps, createCommentVNode, createTextVNode, toDisplayString } from 'vue';
import '../../../utils/index.mjs';
import { segmentedProps } from './segmented.mjs';
import { createNamespace } from '../../../utils/create-namespace.mjs';

"use strict";
var _sfc_main = /* @__PURE__ */ defineComponent({
  ...{ name: "LlSegmented" },
  __name: "segmented",
  props: segmentedProps,
  setup(__props) {
    const attrs = useAttrs();
    const bem = createNamespace("segmented");
    return (_ctx, _cache) => {
      const _component_ll_icon = resolveComponent("ll-icon");
      const _component_a_segmented = resolveComponent("a-segmented");
      return openBlock(), createBlock(_component_a_segmented, mergeProps({ ref: "segmentedRef" }, unref(attrs), {
        class: [
          unref(bem).b(),
          _ctx.useHover ? unref(bem).is("use-hover") : "",
          unref(bem).is(_ctx.checkedStyle === "blue" ? "blue-style" : "white-style")
        ]
      }), createSlots({
        _: 2
        /* DYNAMIC */
      }, [
        _ctx.$slots.label ? {
          name: "label",
          fn: withCtx((data) => [
            renderSlot(_ctx.$slots, "label", normalizeProps(guardReactiveProps(data)))
          ]),
          key: "0"
        } : {
          name: "label",
          fn: withCtx((data) => [
            data?.payload?.icon ? (openBlock(), createBlock(_component_ll_icon, {
              key: 0,
              "icon-name": data?.payload?.icon
            }, null, 8, ["icon-name"])) : createCommentVNode("v-if", true),
            createTextVNode(
              " " + toDisplayString(data.title),
              1
              /* TEXT */
            )
          ]),
          key: "1"
        }
      ]), 1040, ["class"]);
    };
  }
});

export { _sfc_main as default };
//# sourceMappingURL=segmented.vue2.mjs.map
