import { defineComponent, useSlots, computed, mergeProps, unref, withCtx, createVNode, renderSlot, createCommentVNode, openBlock, createBlock, useSSRContext } from 'vue'; import { ssrRenderComponent, ssrRenderClass, ssrRenderSlot } from 'vue/server-renderer'; import { b as baseButtonIconSize, B as BasicIconOld, u as usePrefix } from './BasicIconOld-Booq7UXp.mjs'; import { M as Button } from './server.mjs'; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "BasicButtonOld", __ssrInlineRender: true, props: { icon: {}, iconSize: { default: baseButtonIconSize }, iconClass: { default: "" }, suffixIcon: { type: Boolean }, type: {}, size: {}, loading: { type: Boolean } }, setup(__props) { const slot = useSlots(); const _class = computed(() => { if (!slot.default) { return "!px-1 !py-1"; } return ""; }); const _loading = computed(() => { if (props.loading) { return "flex"; } else return "unset"; }); const { prefixCls } = usePrefix("main-button"); const props = __props; return (_ctx, _push, _parent, _attrs) => { const _component_AButton = Button; const _cssVars = { style: { "--4c652d46": _loading.value } }; _push(ssrRenderComponent(_component_AButton, mergeProps({ type: props.type, size: props.size, class: [unref(prefixCls), _class.value], loading: props.loading }, _attrs, _cssVars), { default: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { _push2(`
`); if (_ctx.$slots.default) { ssrRenderSlot(_ctx.$slots, "default", {}, null, _push2, _parent2, _scopeId); } else { _push2(``); } if (_ctx.icon) { _push2(ssrRenderComponent(BasicIconOld, { size: _ctx.iconSize, icon: _ctx.icon, class: _ctx.iconClass }, null, _parent2, _scopeId)); } else { _push2(``); } _push2(`
`); } else { return [ createVNode("div", { class: ["flex items-center gap-1 justify-center flex-row-reverse gap-2 py-1 px-2", [{ "flex-row-reverse": _ctx.suffixIcon }]] }, [ _ctx.$slots.default ? renderSlot(_ctx.$slots, "default", { key: 0 }) : createCommentVNode("", true), _ctx.icon ? (openBlock(), createBlock(BasicIconOld, { key: 1, size: _ctx.iconSize, icon: _ctx.icon, class: _ctx.iconClass }, null, 8, ["size", "icon", "class"])) : createCommentVNode("", true) ], 2) ]; } }), _: 3 }, _parent)); }; } }); const _sfc_setup = _sfc_main.setup; _sfc_main.setup = (props, ctx) => { const ssrContext = useSSRContext(); (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/BasicPacks/BasicButtonOld.vue"); return _sfc_setup ? _sfc_setup(props, ctx) : void 0; }; const BasicButtonOld = Object.assign(_sfc_main, { __name: "BasicPacksBasicButtonOld" }); export { BasicButtonOld as B };