UNPKG

@shopgate/engage

Version:
4 lines 1.13 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} */var ItemFulfillmentMethod=function ItemFulfillmentMethod(_ref){var isOpen=_ref.isOpen,methods=_ref.methods,onClose=_ref.onClose,onSelect=_ref.onSelect;return React.createElement(SheetDrawer,{isOpen:isOpen,title:i18n.text('favorites.fo_method_chooser.title'),onDidClose:function onDidClose(){return onClose(null);}},React.createElement(SheetList,null,methods.includes('ROPIS')?React.createElement(SheetList.Item,{title:i18n.text('locations.method.ropis'),onClick:function onClick(){return onSelect('ROPIS');}}):null,methods.includes('BOPIS')?React.createElement(SheetList.Item,{title:i18n.text('locations.method.bopis'),onClick:function onClick(){return onSelect('BOPIS');}}):null,methods.includes('directShip')?React.createElement(SheetList.Item,{title:i18n.text('locations.method.direct_ship'),onClick:function onClick(){return onSelect('directShip');}}):null));};export default ItemFulfillmentMethod;