import{__assign as e}from'./../../../ext-esm/tslib/tslib.es6.js';import{jsxs as a,jsx as r}from"react/jsx-runtime";import i from"classnames";import{Typography as t,Accordion as o,AccordionSummary as n,Tooltip as s,AccordionDetails as l}from"@material-ui/core";import c from"@material-ui/icons/ArrowForward";import{truncateString as d}from"../../Search/utils/truncate.js";import{useDQUnvalidatedContentStyles as m}from"../styles.js";import{UniversalLink as u}from"../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import{MIXPANEL_ACTION_TYPES as h}from"../../../constants/mixpanel.js";import{DQAccordionDetailsContent as p}from"./DQAccordionDetailsContent.js";var v=function(v){var f=v.assetsData,D=v.maxHeight,N=v.onMouseLeave,x=v.onMouseEnter,g=v.tooltipRef,j=m({maxHeight:D});return a("div",e({ref:g,className:j.container,onMouseLeave:N,onMouseEnter:x},{children:[a("div",{children:[r(t,e({className:j.headerText,"data-testid":"Status_badge__DQ_unvalidated_content"},{children:"Data Quality"})),r(t,e({className:j.subheaderText},{children:"Fusion real-time data quality rules for app data"}))]}),r("div",e({className:j.relative},{children:r("div",e({className:j.accordionsWrapper},{children:Object.keys(f).map((function(t){var m,v=f[t];return a(o,e({className:j.accordion,defaultExpanded:!0},{children:[r(n,e({className:i("large","stretched")},{children:a("div",e({className:j.headerWrapper},{children:[r("span",{children:d(t,{maxChars:35,charsNumFromStart:13,charsNumFromEnd:12})}),r(s,e({title:"Go to Data Quality page"},{children:r("div",{children:r(u,e({className:j.link,href:null===(m=v[0])||void 0===m?void 0:m.linkToDQPage,onClick:function(){var e;null===(e=window[Symbol.for("logToMixpanel")])||void 0===e||e.call(window,h.REDIRECT.ASSET_DASHBOARD,{referer:"DQ Badge"})}},{children:r(c,{className:j.linkIcon})}))})}))]}))})),r(l,e({className:j.accordionDetails},{children:r(p,{assets:v})}))]}),t)}))}))}))]}))};export{v as DQUnvalidatedContent};
