{"version":3,"file":"main.D9dK7F.js","sources":["theme-53/virtual:theme","theme-53/discourse/api-initializers/theme-initializer.gjs","theme-53/virtual:entrypoint:main"],"sourcesContent":["import { getObjectForTheme } from \"discourse/lib/theme-settings-store\";\n\nexport const settings = getObjectForTheme(53);\n\nexport function themePrefix(key) {\n  return `theme_translations.53.${key}`;\n}\n","import { withPluginApi } from \"discourse/lib/plugin-api\";\n\nfunction _attachTopicButtons(el) {\n  // Select the wraps specifically for 'topic-button'\n  const wraps = el.querySelectorAll(\".d-wrap[data-wrap=topic-button]\");\n\nwraps.forEach((wrap) => {\n  const link = wrap.querySelector(\"a\");\n  \n  if (link && link.href) {\n    // Add the button classes directly to the <a> tag\n    link.classList.add(\"btn\", \"btn-primary\", \"btn-text\", \"custom-topic-button\");\n    \n    // Ensure it opens in a new tab if that's the goal\n    link.setAttribute(\"target\", \"_blank\");\n    link.setAttribute(\"rel\", \"noopener noreferrer\");\n\n    // Optional: Move the link out of the wrap or remove the wrap's styling\n    // so the anchor is the primary element.\n  }\n});\n}\n\nexport default {\n  name: \"topic-button\",\n\n  initialize() {\n    withPluginApi(\"0.8.31\", (api) => {\n      api.decorateCookedElement(_attachTopicButtons, {\n        id: \"topic-button-decorator\",\n      });\n    });\n  },\n};","import * as Mod1 from \"./discourse/api-initializers/theme-initializer\";\nconst compatModules = {\n  \"discourse/api-initializers/theme-initializer\": Mod1,\n};\nexport { compatModules };\nexport default compatModules;\n"],"names":["getObjectForTheme","_attachTopicButtons","el","querySelectorAll","forEach","wrap","link","querySelector","href","classList","add","setAttribute","themeInitializer","name","initialize","withPluginApi","api","decorateCookedElement","id","compatModules"],"mappings":";AAEwBA,EAAkB;;ACA1C,SAASC,EAAoBC,GAEbA,EAAGC,iBAAiB,mCAE9BC,QAASC,IACb,MAAMC,EAAOD,EAAKE,cAAc;AAE5BD,GAAQA,EAAKE,OAEfF,EAAKG,UAAUC,IAAI,MAAO,cAAe,WAAY,uBAGrDJ,EAAKK,aAAa,SAAU,UAC5BL,EAAKK,aAAa,MAAO,yBAM7B,CAEA,IAAAC,EAAe,CACbC,KAAM,eAENC,UAAAA;8BACEC,CAAc,SAAWC,IACvBA,EAAIC,sBAAsBhB,EAAqB,CAC7CiB,GAAI,4BAGV;AC/BG,MAACC,EAAgB,CACpB;"}