import { createVNode as _createVNode, mergeProps as _mergeProps } from "vue";
import { boolType, classNames, funcType } from "@antdv/pro-utils";
import { computed, defineComponent } from "vue";
import { ArrowSvgIcon } from "../SiderMenu/Arrow.mjs";
import { useStyle } from "./style.mjs";
const CollapsedIcon = defineComponent({
  name: "CollapsedIcon",
  inheritAttrs: false,
  props: {
    isMobile: boolType(),
    collapsed: boolType(),
    onClick: funcType()
  },
  setup(props, {
    attrs
  }) {
    const {
      wrapSSR,
      hashId
    } = useStyle(computed(() => attrs.class));
    return () => {
      const {
        isMobile,
        collapsed
      } = props;
      if (isMobile && collapsed) return null;
      return wrapSSR(_createVNode("div", _mergeProps(attrs, {
        "onClick": props.onClick,
        "class": classNames(attrs.class, hashId.value, {
          [`${attrs.class}-collapsed`]: collapsed,
          [`${attrs.class}-is-mobile`]: isMobile
        })
      }), [_createVNode(ArrowSvgIcon, null, null)]));
    };
  }
});
export {
  CollapsedIcon
};
