@letanure/resend-cli
Version:
A command-line interface for Resend email API
48 lines • 1.63 kB
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { Layout } from '../../components/ui/layout.js';
import { Menu as UIMenu } from '../../components/ui/Menu.js';
import { config } from '../../config/config.js';
export var MenuState;
(function (MenuState) {
MenuState["send"] = "send";
MenuState["batch"] = "batch";
MenuState["retrieve"] = "retrieve";
MenuState["update"] = "update";
MenuState["cancel"] = "cancel";
})(MenuState || (MenuState = {}));
const MAIN_MENU_ITEMS = [
{
id: MenuState.send,
label: 'Send',
description: 'Start sending emails through the Resend Email API.',
},
{
id: MenuState.retrieve,
label: 'Retrieve',
description: 'Retrieve a single email.',
},
{
id: MenuState.update,
label: 'Update',
description: 'Update a scheduled email.',
},
{
id: MenuState.cancel,
label: 'Cancel',
description: 'Cancel a scheduled email.',
},
{
id: MenuState.batch,
label: 'Batch',
description: 'To be implemented - file-based batch email operations.',
disabled: true,
},
];
export const Menu = ({ onExit, onSelect, initialSelectedKey }) => {
return (_jsx(Layout, { headerText: `${config.baseTitle} - Emails`, showNavigationInstructions: true, navigationContext: "menu", children: _jsx(UIMenu, { menuItems: MAIN_MENU_ITEMS, onSelect: (menuId) => {
onSelect(menuId);
}, onExit: () => {
onExit();
}, initialSelectedKey: initialSelectedKey }) }));
};
//# sourceMappingURL=Menu.js.map