{getShippingLabelWithPrice(shippingItem)}
\n ) : (\n `${getShippingLabelWithPrice(shippingItem)}${\n i < shippingOptions.length ? ', ' : ''\n }`\n );\n });\n }\n }\n\n const itemOffersTakeawayOnly = () =>\n shippingOptions.length === 1 &&\n shippingOptions.find(\n (shippingOption) => shippingOption.shippingType === 'Takeaway'\n ) !== undefined\n ? true\n : false;\n const getCheapestShippingCost = () =>\n shippingOptions.length === 0\n ? { shippingCost: 0 }\n : shippingOptions.reduce((accumulator, currentValue) => {\n if (\n (currentValue.shippingCost <\n accumulator.shippingCost &&\n currentValue.shippingType !== 'Takeaway') ||\n accumulator.shippingType === 'Takeaway'\n ) {\n return currentValue;\n }\n return accumulator;\n });\n\n return itemOffersTakeawayOnly()\n ? STRINGS.SHIPPING_LABELS.TAKEAWAY\n : formatPrice(getCheapestShippingCost().shippingCost);\n };\n};\n\nexport const isNormalListViewType = (listViewType) =>\n listViewType === LIST_VIEW_TYPES.NORMAL;\n","import { PAGE_LIST_TYPES, PAGE_BULK_ACTIONS } from '../constants/list-types';\n\n/**\n * @param {string} listType\n * @param {object} item\n * @returns {object} 'Bulk Actions' available for the specific list\n */\n\nexport const listActions = (\n listType,\n memberId,\n selectedFilterBar,\n count = 0,\n t\n) => {\n const actions = {\n [PAGE_LIST_TYPES.SELLER_ACTIVE]: () => {\n switch (selectedFilterBar) {\n default:\n return {\n isCheckboxActive: (item) =>\n item && item.bidInformation.bidCount === 0,\n bulkCssClass: 'outline-dark',\n label: t('myt_action_cancelListingsLabel'),\n bulkAction: PAGE_BULK_ACTIONS.ACTIVE_CANCEL,\n modal: {\n icon: 'warning',\n heading: t(\n 'myt_action_cancelListingsModalHeading',\n { count: count, itemCount: count }\n ),\n message: t(\n 'myt_action_cancelListingsModalMessage',\n { count: count }\n ),\n confirmButtonText: t(\n 'myt_action_cancelListingsModalConfirmButtonText'\n ),\n cancelButtonText: t(\n 'myt_action_cancelListingsModalCancelButtonText'\n ),\n dismissable: true\n },\n idType: 'itemId'\n };\n }\n },\n\n [PAGE_LIST_TYPES.SELLER_NOT_SOLD]: () => {\n switch (selectedFilterBar) {\n default:\n return {\n isCheckboxActive: (item) => {\n if (!item) {\n return false;\n }\n if (item.listing.restart.hasRestartedChild) {\n return false;\n }\n return !item.isArchived;\n },\n /*\n * @todo: confirm this\n */\n bulkCssClass: 'outline-dark',\n label: t('myt_action_restartListingsLabel'),\n bulkAction: PAGE_BULK_ACTIONS.UNSOLD_RESTART,\n modal: {\n heading: t(\n 'myt_action_restartListingsModalHeading',\n { count: count, itemCount: count }\n ),\n dismissable: true,\n wide: true,\n confirmButtonText: t(\n 'myt_action_restartListingsModalConfirmButtonText'\n ),\n cancelButtonText: t(\n 'myt_action_restartListingsModalCancelButtonText'\n ),\n headingCSS: 'messaging-modal-title-with-line',\n messageAlignment: 'left',\n cssClass: false\n },\n idType: 'itemId'\n };\n }\n },\n\n [PAGE_LIST_TYPES.BUYER_ACTIVE_ITEMS]: () => {\n switch (selectedFilterBar) {\n case 'BuyerHidden':\n return {\n isCheckboxActive: (item) => {\n return (\n (item &&\n item.caller.leadingBidRemoved === true) ||\n (item.bidInformation.leadingBidder &&\n item.bidInformation.leadingBidder.id !==\n memberId)\n );\n },\n bulkCssClass: 'outline-dark',\n label: t(\n 'myt_action_showBuyerHiddenActiveListingsLabel'\n ),\n bulkAction: PAGE_BULK_ACTIONS.BUYER_SHOW_ACTIVE,\n modal: {\n heading: t(\n 'myt_action_showBuyerHiddenActiveListingsModalHeading',\n { count: count, itemCount: count }\n ),\n message: t(\n 'myt_action_showBuyerHiddenActiveListingsModalMessage',\n { count: count }\n ),\n dismissable: true,\n wide: false,\n confirmButtonText: t(\n 'myt_action_showBuyerHiddenActiveListingsModalConfirmButtonText'\n ),\n cancelButtonText: t(\n 'myt_action_showBuyerHiddenActiveListingsModalCancelButtonText'\n ),\n icon: 'warning',\n headingCSS: 'messaging-modal-title',\n messageAlignment: 'center',\n cssClass: false\n }\n };\n case 'BuyerNotHidden':\n return {\n isCheckboxActive: (item) => {\n return (\n (item &&\n item.caller?.leadingBidRemoved === true) ||\n (item.bidInformation.leadingBidder &&\n (item.bidInformation.leadingBidder.id !==\n memberId ||\n item.reservePriceReached === false))\n );\n },\n bulkCssClass: 'outline-dark',\n label: t('myt_action_hideListingsLabel'),\n bulkAction: PAGE_BULK_ACTIONS.BUYER_HIDE_ACTIVE,\n modal: {\n heading: t('myt_action_hideListingsModalHeading', {\n count: count,\n itemCount: count\n }),\n dismissable: true,\n wide: false,\n icon: 'warning',\n confirmButtonText: t(\n 'myt_action_hideListingsModalConfirmButtonText'\n ),\n cancelButtonText: t(\n 'myt_action_hideListingsModalCancelButtonText'\n ),\n message: t('myt_action_hideListingsModalMessage', {\n count: count\n }),\n headingCSS: 'messaging-modal-title',\n messageAlignment: 'center',\n cssClass: false\n }\n };\n default:\n return undefined;\n }\n },\n\n [PAGE_LIST_TYPES.BUYER_ITEMS_LOST]: () => {\n switch (selectedFilterBar) {\n case 'ItemsLostNotHidden':\n return {\n isCheckboxActive: () => true,\n bulkCssClass: 'outline-dark',\n label: t('myt_action_hideListingsLabel'),\n bulkAction: PAGE_BULK_ACTIONS.BUYER_HIDE_ACTIVE,\n modal: {\n heading: t('myt_action_hideListingsModalHeading', {\n count: count,\n itemCount: count\n }),\n dismissable: true,\n wide: false,\n icon: 'warning',\n confirmButtonText: 'Ja',\n cancelButtonText: 'Nej',\n message: t('myt_action_hideListingsModalMessage', {\n count: count\n }),\n headingCSS: 'messaging-modal-title',\n messageAlignment: 'center',\n cssClass: false\n }\n };\n case 'ItemsLostHidden':\n return {\n isCheckboxActive: () => true,\n bulkCssClass: 'outline-dark',\n label: t(\n 'myt_action_showBuyerHiddenActiveListingsLabel'\n ),\n bulkAction: PAGE_BULK_ACTIONS.BUYER_SHOW_ACTIVE,\n modal: {\n heading: t(\n 'myt_action_showBuyerHiddenActiveListingsModalHeading',\n { count: count, itemCount: count }\n ),\n message: t(\n 'myt_action_showBuyerHiddenActiveListingsModalMessage',\n { count: count }\n ),\n dismissable: true,\n wide: false,\n confirmButtonText: t(\n 'myt_action_showBuyerHiddenActiveListingsModalConfirmButtonText'\n ),\n cancelButtonText: t(\n 'myt_action_showBuyerHiddenActiveListingsModalCancelButtonText'\n ),\n icon: 'warning',\n headingCSS: 'messaging-modal-title',\n messageAlignment: 'center',\n cssClass: false\n }\n };\n default:\n return undefined;\n }\n },\n\n default: () => ({})\n };\n\n return actions[listType] ? actions[listType]() : actions['default']();\n};\n","import { selectFiltersState } from 'tradera/apps/my-tradera/app/state/selectors/filters';\n\nconst getDefaultFilters = (filtersState, checkModifiersExist) => {\n return {\n 'filters[paging][page]':\n checkModifiersExist && filtersState.modifiers.paging\n ? filtersState.modifiers.paging.page\n : '',\n 'filters[paging][size]':\n checkModifiersExist && filtersState.modifiers.paging\n ? filtersState.modifiers.paging.size\n : '',\n 'filters[selectedFilterBar]': checkModifiersExist\n ? filtersState.modifiers.selectedFilterBar\n : '',\n 'filters[sellerFilters][feedbackLeft]':\n checkModifiersExist && filtersState.modifiers.sellerFilters\n ? filtersState.modifiers.sellerFilters.feedbackLeft\n : '',\n 'filters[sellerFilters][paid]':\n checkModifiersExist && filtersState.modifiers.sellerFilters\n ? filtersState.modifiers.sellerFilters.paid\n : '',\n 'filters[sellerFilters][shipped]':\n checkModifiersExist && filtersState.modifiers.sellerFilters\n ? filtersState.modifiers.sellerFilters.shipped\n : '',\n 'filters[sellerFilters][hidden]':\n checkModifiersExist && filtersState.modifiers.sellerFilters\n ? filtersState.modifiers.sellerFilters.hidden\n : '',\n 'filters[buyerFilters][feedbackLeft]':\n checkModifiersExist && filtersState.modifiers.buyerFilters\n ? filtersState.modifiers.buyerFilters.feedbackLeft\n : '',\n 'filters[buyerFilters][paid]':\n checkModifiersExist && filtersState.modifiers.buyerFilters\n ? filtersState.modifiers.buyerFilters.paid\n : '',\n 'filters[buyerFilters][hidden]':\n checkModifiersExist && filtersState.modifiers.buyerFilters\n ? filtersState.modifiers.buyerFilters.hidden\n : ''\n };\n};\n\n/** This matches query parameters to state filters.\n * @param {object} state\n * @returns {object}\n */\nexport const getAvailableQueryParams = (state) => {\n const filtersState = selectFiltersState(state);\n\n const checkModifiersExist =\n !!state && filtersState && filtersState.modifiers;\n\n const defaultFilters = getDefaultFilters(filtersState, checkModifiersExist);\n\n return {\n ...defaultFilters,\n 'filters[datatype]': checkModifiersExist\n ? filtersState.modifiers.datatype\n : '',\n 'filters[dateRange][field]':\n checkModifiersExist && filtersState.modifiers.dateRange\n ? filtersState.modifiers.dateRange.field\n : '',\n 'filters[dateRange][from]':\n checkModifiersExist && filtersState.modifiers.dateRange\n ? filtersState.modifiers.dateRange.from\n : '',\n 'filters[dateRange][to]':\n checkModifiersExist && filtersState.modifiers.dateRange\n ? filtersState.modifiers.dateRange.to\n : '',\n 'filters[hasBids]': checkModifiersExist\n ? filtersState.modifiers.hasBids\n : '',\n 'filters[itemCondition]': checkModifiersExist\n ? filtersState.modifiers.itemCondition\n : '',\n 'filters[itemType]': checkModifiersExist\n ? filtersState.modifiers.itemType\n : '',\n 'filters[processState]': checkModifiersExist\n ? filtersState.modifiers.processState\n : '',\n 'filters[purchaseType]': checkModifiersExist\n ? filtersState.modifiers.purchaseType\n : '',\n 'filters[query][properties]':\n checkModifiersExist && filtersState.modifiers.query\n ? filtersState.modifiers.query.properties\n : '',\n 'filters[query][scope]':\n checkModifiersExist && filtersState.modifiers.query\n ? filtersState.modifiers.query.scope\n : '',\n 'filters[query][searchQuery]':\n checkModifiersExist && filtersState.modifiers.query\n ? filtersState.modifiers.query.searchQuery\n : '',\n 'filters[reservePriceReached]': checkModifiersExist\n ? filtersState.modifiers.reservePriceReached\n : '',\n 'filters[searchType]': checkModifiersExist\n ? filtersState.modifiers.searchType\n : '',\n 'filters[sellerFilters][shippingBooked]':\n checkModifiersExist && filtersState.modifiers.sellerFilters\n ? filtersState.modifiers.sellerFilters.shippingBooked\n : '',\n 'filters[sort][order]':\n checkModifiersExist && filtersState.modifiers.sort\n ? filtersState.modifiers.sort.order\n : '',\n 'filters[sort][sorting]':\n checkModifiersExist && filtersState.modifiers.sort\n ? filtersState.modifiers.sort.sorting\n : '',\n 'filters[userIs]': checkModifiersExist\n ? filtersState.modifiers.userIs\n : '',\n 'filters[selectedFilterBar]': checkModifiersExist\n ? filtersState.modifiers.selectedFilterBar\n : ''\n };\n};\n\n/**\n * Checks if a query parameter is in the available parameters.\n * @param {function} getState\n * @param {object} locationQuery\n */\nexport const checkStateOfQueryParams = (getState, locationQuery) => {\n const check = getAvailableQueryParams(getState());\n const checkItem = (item) =>\n !!check[item] &&\n check[item].toString() !== locationQuery[item].toString();\n return Object.keys(check).some((item) => {\n if (!check[item] || !locationQuery[item]) {\n return false;\n }\n return checkItem(item) ? true : false;\n });\n};\n","import mapObject from 'lodash/mapValues';\nimport { REDIRECT_TO_NEWDRAFT_QUERY } from 'tradera/apps/syi/constants';\nimport { OPTIONAL_LANG } from 'tradera/apps/tradera/helpers/optional-lang';\nimport PAGE_TYPES from 'tradera/constants/page-types';\n\nexport const myTraderaUrls = {\n overview: '/my/overview',\n overview2: '/my/overview2',\n buyerOverview: '/my/overview-buyer',\n sellerOverview: '/my/overview-seller',\n accountOverview: '/my/overview-my-account',\n wishlist: '/my/wish-list',\n profile: '/profile/items/:memberId/:cleanedMemberAlias',\n activeItems: '/my/active-items',\n itemsLost: '/my/items-lost',\n active: '/my/active',\n sold: '/my/sold',\n unsold: '/my/unsold',\n listings: '/my/listings',\n listingsUnsold: '/my/listings?tab=unsold',\n bidding: '/my/bidding',\n purchases: '/my/purchases',\n savedSearches: '/my/saved-searches',\n sellerList: '/my/seller-list',\n pickList: '/my/picklist',\n leaveFeedback: '/my/leave-feedback/:role',\n buyerFeedback: '/my/leave-feedback/buyer',\n sellerFeedback: '/my/leave-feedback/seller',\n myFeedback: '/my/feedback',\n invoices: '/my/invoices',\n templates: '/selling/templates',\n payouts: '/my/payouts',\n accounting: '/my/accounting',\n messaging: '/messaging',\n selling: `/selling?${REDIRECT_TO_NEWDRAFT_QUERY}`,\n sellingTemplates: '/selling/templates',\n settings: '/my/settings',\n settingsAccount: '/my/settings/account',\n settingsEmail: '/my/settings/email',\n settingsSelling: '/my/settings/selling',\n settingsNotifications: '/my/settings/notifications',\n settingsSecurity: '/my/settings/security',\n settingsPayouts: '/my/settings/payouts',\n settingsLocalization: '/my/settings/localization',\n buyShippingBags: '/tradera-shop/shipping-bags',\n payeeVerification: '/my/PayeeVerification',\n hyperwalletPayeeVerificationCompleted: '/my/PayeeVerificationCompleted',\n shippingCheckout: '/my/shipping/checkout',\n shippingBook: '/my/shipping',\n shippingConfirmation: '/my/shipping/confirmation/:shipmentCheckoutId',\n invoiceCheckout: '/my/invoices/payment/:invoiceId',\n invoiceConfirmation: '/my/invoices/confirmation/:invoiceId',\n traderaShop: '/tradera-shop',\n notFound: '/my/settings/*'\n} as const;\n\nexport const getMyTraderaUrls = (\n toLocalizedUrl: (url: string) => string\n): Record\n
\n {t('buyerProtectionModal_example')}\n {t('buyerProtectionModal_price')}\n
\n\n \n {t('buyerProtectionModal_example1Text_localized', {\n amount: localizedPriceFormatter(2000)\n })}\n \n \n {localizedPriceFormatter(\n +t(\n 'buyerProtectionModal_example1BuyerProtectionAmount'\n )\n )}\n \n
\n\n \n {t('buyerProtectionModal_example2Text_localized', {\n amount: localizedPriceFormatter(500)\n })}\n \n \n {localizedPriceFormatter(\n +t(\n 'buyerProtectionModal_example2BuyerProtectionAmount'\n )\n )}\n \n
\n >\n \n );\n};\n","import { classNames } from 'tradera/utils/class-names';\nimport type React from 'react';\nimport { forwardRef } from 'react';\nimport type { PolyRefFunction, OnlyAs } from 'react-polymorphed';\n\nimport styles from './heading.module.scss';\n\nconst polyRef = forwardRef as PolyRefFunction;\n\ntype HeadingSize =\n | 'stockholm'\n | 'madrid'\n | 'berlin'\n | 'london'\n | 'amsterdam'\n | 'paris';\n\nconst HeadingSizesMap: Record\n \n {t('bidHistory_numberOfBiddersWithCount', {\n count: biddersCount\n })}\n {' '}\n {currency !== 'SEK' && (\n \n {currencyIsSEK ? (\n
{t('bidHistory_errorTryLater')}
\n