"use strict";var e=require("@babel/runtime/helpers/slicedToArray"),t=require("react/jsx-runtime"),a=require("react"),s=require("classnames"),i=require("./images/index.js"),r=require("../../effects/useResizeObserver.js"),l=require("./constants.js"),u=require("./utils.js"),c=require("./styles.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=d(e),n=d(s),f=function(e){var s=e.title,d=void 0===s?"No Data Available":s,f=e.subtitle,S=void 0===f?"":f,v=e.image,m=void 0===v?i.NoDataAvailable:v,b=e.classes,j=void 0===b?{}:b,q=e["data-testid"],A=void 0===q?"EmptyState":q,x=a.useState(l.SIZES.LARGE),E=o.default(x,2),g=E[0],N=E[1],p=a.useState(!1),h=o.default(p,2),y=h[0],z=h[1],M=a.useRef(null),_=a.useCallback((function(e){var t=o.default(e,1)[0].borderBoxSize[0].blockSize;N(u.getSize(t)),z(!0)}),[]);r({callback:_,containerRef:M});var G=c.useStyles({image:m,size:g}),P=g!==l.SIZES.SMALL;return t.jsx("div",{className:n.default(G.rootTransparent,y&&G.rootOpaque,j.root),children:t.jsxs("div",{"data-testid":"".concat(A,"_fullMessage"),className:n.default(G.content,j.content),ref:M,children:[t.jsx("div",{"data-testid":"".concat(A,"_title"),className:n.default(G.title,j.title),children:d}),t.jsx("div",{"data-testid":"".concat(A,"_subtitle"),className:n.default(G.subtitle,j.subtitle),children:S}),P&&t.jsx("img",{src:m,className:G.image,alt:"error"})]})})};f.IMAGES=i,f.APP_MESSAGES=l.APP_MESSAGES,module.exports=f;
//# sourceMappingURL=EmptyState.js.map
