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