export const validateAmountCurrency = ({ type, required }) => (value) => {
    if (!value)
        return true;
    if (typeof value === 'object' && 'unit' in value) {
        if (['AmountFiat', 'AmountCrypto', 'AmountCurrency', 'Amount'].includes(type)) {
            const actualUnit = value.unit;
            if (!actualUnit) {
                return required ? 'Please select a valid currency' : true;
            }
            return true;
        }
        return true;
    }
    return true;
};
//# sourceMappingURL=amount-currency-validations.js.map