UNPKG

@shopgate/engage

Version:
33 lines (32 loc) 1.16 kB
import React from 'react'; import PropTypes from 'prop-types'; import { i18n } from '@shopgate/engage/core'; import { SheetList, SheetDrawer } from '@shopgate/engage/components'; /** * @param {Object} props Props. * @returns {JSX.Element} */ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; const ItemFulfillmentMethod = ({ isOpen, methods, onClose, onSelect }) => /*#__PURE__*/_jsx(SheetDrawer, { isOpen: isOpen, title: i18n.text('favorites.fo_method_chooser.title'), onDidClose: () => onClose(null), children: /*#__PURE__*/_jsxs(SheetList, { children: [methods.includes('ROPIS') ? /*#__PURE__*/_jsx(SheetList.Item, { title: i18n.text('locations.method.ropis'), onClick: () => onSelect('ROPIS') }) : null, methods.includes('BOPIS') ? /*#__PURE__*/_jsx(SheetList.Item, { title: i18n.text('locations.method.bopis'), onClick: () => onSelect('BOPIS') }) : null, methods.includes('directShip') ? /*#__PURE__*/_jsx(SheetList.Item, { title: i18n.text('locations.method.direct_ship'), onClick: () => onSelect('directShip') }) : null] }) }); export default ItemFulfillmentMethod;