import { observer } from 'mobx-react-lite';
import { CounterBadge } from '@wix/design-system';
import React from 'react';
import { useFilterValueTotalState, } from './useFilterValueTotalState';
import { initTabTotal } from '../../state/initTabTotal';
function _TabCounterBadge(props) {
    const { value, skin = 'neutralStandard', ...rest } = props;
    const state = useFilterValueTotalState(props);
    const { totalsCollection: { totalStatus, total, lifecycleState }, } = state;
    return totalStatus === 'success' && lifecycleState === 'result' ? (React.createElement(CounterBadge, { skin: skin, ...rest }, total)) : null;
}
_TabCounterBadge.initTabTotal = initTabTotal;
export const TabTotalCounterBadge = observer(_TabCounterBadge);
TabTotalCounterBadge.displayName = 'TabTotalCounterBadge';
TabTotalCounterBadge.initTabTotal = initTabTotal;
//# sourceMappingURL=TabTotalCounterBadge.js.map