import{typeof as t}from"../../../_virtual/_rollupPluginBabelHelpers.js";import{__rest as e}from"../../../_virtual/_tslib.js";import i,{forwardRef as r}from"react";import n from"classnames";import s from"../Flex/Flex.js";import a from"../Heading/Heading.js";import m from"../Text/Text.js";import o from"./EmptyState.module.scss.js";import{getStyle as l}from"../../helpers/typesciptCssModulesHelper.js";import{getTestId as c,ComponentDefaultTestId as p}from"../../tests/testIds.js";import u from"../Link/Link.js";import{ComponentVibeId as d}from"../../tests/constants.js";import f from"../../../components/button/dist/Button/Button.js";var g=r((function(r,g){var j=r.className,x=r.title,E=r.description,y=r.visual,b=r.mainAction,v=r.supportingAction,T=r.layout,N=void 0===T?"default":T,_=r.id,h=r["data-testid"],k="compact"===N;return i.createElement(s,{direction:"column",align:"center",justify:"center",gap:k?"small":"medium",className:n(o.emptyState,l(o,N),j),id:_,"data-testid":h||c(p.EMPTY_STATE,_),"data-vibe":d.EMPTY_STATE,ref:g},!!y&&y,i.createElement(s,{direction:"column",align:"center",gap:k?12:"medium",className:o.content},i.createElement(s,{direction:"column",align:"center",gap:"xs"},x&&i.createElement(a,{type:"h3",weight:"normal",className:o.title,align:"center",ellipsis:!1},x),"string"==typeof E?i.createElement(m,{className:o.description,align:"center",ellipsis:!1},E):E),(b||v)&&i.createElement(s,{direction:"column",align:"center",gap:"small",className:o.actions},function(e,r){if("object"===t(e)&&"text"in e)return i.createElement(f,Object.assign({kind:"secondary",size:r?"small":"medium"},e),e.text);return e}(b,k),function(r,n){if("object"===t(r)){if("text"in r&&"href"in r){var s=r.text,a=e(r,["text"]);return i.createElement(u,Object.assign({text:s},a))}if("text"in r){var m=r.text,o=e(r,["text"]);return i.createElement(f,Object.assign({kind:"tertiary",size:n?"small":"medium"},o),m)}}return r}(v,k))))}));export{g as default};
//# sourceMappingURL=EmptyState.js.map
