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