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