@shopgate/engage
Version:
Shopgate's ENGAGE library.
25 lines (24 loc) • 806 B
JavaScript
import React from 'react';
import classNames from 'classnames';
import { i18n } from '@shopgate/engage/core/helpers';
import { IN_STORE_PICKUP_BOPIS_LABEL } from "../../constants";
import { itemRowDisabled } from "./FulfillmentSelectorItem.style";
import { useFulfillmentSelectorState } from "./FulfillmentSelector.hooks";
/**
* Renders the FulfillmentSelectorBOPIS components.
* @returns {JSX.Element}
*/
import { jsx as _jsx } from "react/jsx-runtime";
export const FulfillmentSelectorBOPIS = () => {
const {
isBOPISEnabled,
isReady
} = useFulfillmentSelectorState();
const classes = classNames({
[itemRowDisabled.toString()]: !isReady || !isBOPISEnabled
});
return /*#__PURE__*/_jsx("div", {
className: classes,
children: i18n.text(IN_STORE_PICKUP_BOPIS_LABEL)
});
};