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