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