import { checkEmpty } from '../../utils/checkEmpty/checkEmpty.js';

/**
 * Utility function to validate an array of directional arrows.
 * Ensures there is at least one valid arrow in the array.
 * If the array is empty, it returns a default arrow object.
 */
const validateArrows = (arrows) => {
    if (checkEmpty(arrows)) {
        return [
            {
                direction: null,
                menuOptions: [
                    {
                        label: 'Sub Module',
                        value: 'sub_module',
                        icon: '',
                        disable: false,
                        tooltipForOption: '',
                        tooltipPlacementForOption: undefined,
                    },
                ],
            },
        ];
    }
    return arrows;
};

export { validateArrows };
//# sourceMappingURL=type.js.map
