{"version":3,"file":"offer_filter_controller-C-twWfR-.js","names":[],"sources":["../../../app/javascript/entrypoints/site_controllers/offer_filter_controller.js"],"sourcesContent":["import { Controller } from \"@hotwired/stimulus\"\n\n// Category pills above the offer grid: shows only the cards of the chosen category.\nexport default class extends Controller {\n static targets = [\"button\", \"card\"]\n\n select(event) {\n const category = event.currentTarget.dataset.category\n this.buttonTargets.forEach((button) => button.setAttribute(\"aria-pressed\", String(button === event.currentTarget)))\n this.cardTargets.forEach((card) => {\n card.hidden = !(category === \"all\" || card.dataset.category === category)\n })\n }\n}\n"],"mappings":"4GAGA,EAAA,cAA6B,CAAW,CACtC,OAAO,QAAU,CAAC,SAAU,OAAO,CAEnC,OAAO,EAAO,CACZ,IAAM,EAAW,EAAM,cAAc,QAAQ,SAC7C,KAAK,cAAc,QAAS,GAAW,EAAO,aAAa,eAAgB,OAAO,IAAW,EAAM,cAAc,CAAC,CAAC,CACnH,KAAK,YAAY,QAAS,GAAS,CACjC,EAAK,OAAS,EAAE,IAAa,OAAS,EAAK,QAAQ,WAAa,IAChE"}