import _taggedTemplateLiteralLoose from "@babel/runtime/helpers/taggedTemplateLiteralLoose";

var _templateObject;

import React from 'react';
import { useBasketItemList, useLocalLabels } from '@sentecacommerce-theme/lib';
import { Typography } from '../../../../../Common';
import styled from 'styled-components';
import { CheckoutTitle } from '../../../UI';
import { Item } from './Components/Item';
export var BasketPreview = () => {
  var {
    lineItems
  } = useBasketItemList();
  var isLoading = !lineItems;
  var labels = useLocalLabels();
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CheckoutTitle, {
    data: labels.products,
    small: true
  }), /*#__PURE__*/React.createElement(List, null, !isLoading && /*#__PURE__*/React.createElement(React.Fragment, null, lineItems == null ? void 0 : lineItems.map(item => {
    return /*#__PURE__*/React.createElement(Item, {
      item: item,
      key: item._id
    });
  }))));
};
var List = styled(Typography).attrs({
  className: 'row g-4',
  as: 'ul',
  variant: 6
})(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n  line-height: 1.3;\n  list-style: none;\n"])));
//# sourceMappingURL=index.js.map