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