// @ts-nocheck
import React from 'react';
import intl from 'react-intl-universal';
import styled from 'styled-components';
import { Intent } from '@blueprintjs/core';
import { useTransactionsLockingContext } from './TransactionsLockingProvider';
import {
ButtonLink,
AppToaster,
Join,
FormattedMessage as T,
Alert,
AlertDesc,
} from '@/components';
import {
validateMoveToFullLocking,
validateMoveToPartialLocking,
} from './utils';
/**
* Transactions locking header.
* @returns
*/
export function TransactionsLockingHeader() {
const {
transactionsLocking,
transactionLockingType,
setTransactionLockingType,
} = useTransactionsLockingContext();
// Handle all lock link click.
const handleAllLockClick = () => {
const activeModules = validateMoveToFullLocking(
transactionsLocking.modules,
);
const modulesStrong = activeModules.map((module) => (
{module.formatted_module}
));
if (activeModules.length > 0) {
AppToaster.show({
message: (
You should unlock