{"version":3,"file":"1b42e031.js","sources":["../../../src/rs-components/home/featuredproducts/FeaturedProductSlider.client.tsx"],"sourcesContent":["import { useState, useRef } from \"react\";\nimport ArrowSlider from \"~/assets/icons/ArrowSlider\";\nimport { getCurrencyValue } from \"~/lib/utils\";\nimport { isNonTransactional, showPriceshowPriceTransactional } from \"../../../../setup/settings/__nonTransactional\";\nimport GlobalSlider from \"~/rs-components/widgets/GlobalSlider.client\";\nimport { availabilityOptionsOnCard } from \"../../../../setup/settings/__product\";\nimport FabricType from \"~/assets/icons/FabricType\";\nimport LeatherType from \"~/assets/icons/LeatherType\";\n\nexport default function FeaturedProductSlider({ collection, currency, cardOption }) {\n\n if (!collection) return <>\n\n const { Products } = collection;\n\n const defaultSettings = {\n dots: true,\n infinite: true,\n speed: 500,\n slidesToShow: 3,\n slidesToScroll: 1,\n arrows: true,\n\n responsive: [\n {\n breakpoint: 1025,\n settings: {\n slidesToShow: 2,\n slidesToScroll: 1,\n }\n },\n {\n breakpoint: 885,\n settings: {\n slidesToShow: 1,\n slidesToScroll: 1,\n }\n }\n ]\n };\n\n return (\n
\n
\n

{collection.Title ? collection.Title : 'Exclusive online products'}

\n VIEW ALL\n\n \n\n {Products.map((p, i) => <>\n {cardOption == 0 && }\n {cardOption == 1 && }\n )}\n \n
\n
\n )\n}\n\nconst ProductCardSquare = ({ product, currency }) => {\n return (\n \n
\n \n
\n

{product.title}

\n {(availabilityOptionsOnCard.typeOfMaterialEnabled || availabilityOptionsOnCard.optionsCarouselEnabled) && (\n
\n {availabilityOptionsOnCard.typeOfMaterialEnabled && (\n
\n {product.customfields.infabric === 'Yes' && }\n {product.customfields.inleather === 'Yes' && }\n {product.customfields.inleather === 'Yes' && product.customfields.infabric === 'No' && (\n

Available in Leather

\n )}\n {product.customfields.inleather === 'No' && product.customfields.infabric === 'Yes' && (\n

Available in Fabric

\n )}\n {product.customfields.inleather === 'Yes' && product.customfields.infabric === 'Yes' && (\n

Available in Leather and Fabric

\n )}\n
\n )}\n {availabilityOptionsOnCard.optionsCarouselEnabled && product.optionsPreviewImages && product.optionsPreviewImages.length > 0 && (\n
\n {product.optionsPreviewImages.map((image, index) => (\n {`Option\n ))}\n See more\n
\n )}\n
\n )}\n {(!isNonTransactional || showPriceshowPriceTransactional) &&\n <>\n

Our Price {getCurrencyValue(currency, product.fromPrice)}

\n {product.oldPrice &&

Regular price {getCurrencyValue(currency, product.oldPrice)}

}\n
\n
SHOP
\n
\n }\n \n )\n}\n\nconst ProductCardPortrait = ({ product, currency }) => {\n return (\n \n
\n \n
\n
\n

{product.title}

\n
\n {(availabilityOptionsOnCard.typeOfMaterialEnabled || availabilityOptionsOnCard.optionsCarouselEnabled) && (\n
\n {availabilityOptionsOnCard.typeOfMaterialEnabled && (\n
\n {product.customfields.infabric === 'Yes' && }\n {product.customfields.inleather === 'Yes' && }\n {product.customfields.inleather === 'Yes' && product.customfields.infabric === 'No' && (\n

Available in Leather

\n )}\n {product.customfields.inleather === 'No' && product.customfields.infabric === 'Yes' && (\n

Available in Fabric

\n )}\n {product.customfields.inleather === 'Yes' && product.customfields.infabric === 'Yes' && (\n

Available in Leather and Fabric

\n )}\n
\n )}\n {availabilityOptionsOnCard.optionsCarouselEnabled && product.optionsPreviewImages && product.optionsPreviewImages.length > 0 && (\n
\n {product.optionsPreviewImages.map((image, index) => (\n {`Option\n ))}\n See more\n
\n )}\n
\n )}\n {(!isNonTransactional || showPriceshowPriceTransactional) &&\n <>\n
\n

Our Price {getCurrencyValue(currency, product.fromPrice)}

\n {product.oldPrice &&

Regular price {getCurrencyValue(currency, product.oldPrice)}

}\n
\n
\n
SHOP
\n
\n \n }\n \n )\n}\n\n"],"names":["collection","currency","cardOption","_jsx","_Fragment","Products","defaultSettings","dots","infinite","speed","slidesToShow","slidesToScroll","arrows","responsive","breakpoint","settings","isNonTransactional","Title","Handle","map","p","i","ProductCardSquare","product","handle","images","title","availabilityOptionsOnCard","optionsCarouselEnabled","_jsxs","getCurrencyValue","fromPrice","oldPrice","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