{"version":3,"file":"default/js/experience/assets/cardWithHover.js","mappings":";;;;;AAAa;;AAEb;AACA;AACA,UAAU,QAAQ;AAClB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa;;AAEb;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;AACA;AACA,UAAU,QAAQ;AAClB;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;AACL","sources":["webpack://sfra-startup-kit/./cartridges/app_ahumada/cartridge/client/default/js/experience/assets/cardWithHover.js"],"sourcesContent":["\"use strict\";\n\n/**\n* Initializes the card with hover instance\n* @param {Object} $root - the root element of the card with hover\n*/\nfunction initCardWithHoverInstance($root) {\n $root.on(\"click\", function () {\n const $this = $(this);\n const $cardContent = $this.find(\".js-card-content\").length;\n if ($cardContent) {\n\n $this.find(\".js-card-image-container\").css(\"opacity\", function (_, value) {\n return value === \"0\" ? \"1\" : \"0\";\n });\n\n $this.find(\".js-card-content\").css(\"opacity\", function (_, value) {\n return value === \"0\" ? \"1\" : \"0\";\n });\n }\n });\n}\n/**\n* Initializes the card with hover component\n* @param {Object} $cards - jQuery object of the card with hover component\n*/\n\n{\n const $cards = $(\".js-card-with-hover\");\n\n $cards.each(function () {\n initCardWithHoverInstance($(this));\n });\n}\n"],"names":[],"sourceRoot":""}