{"version":3,"file":"main.v84XQN.js","sources":["theme-41/virtual:theme","theme-41/discourse/api-initializers/theme-initializer.gjs","theme-41/virtual:entrypoint:main"],"sourcesContent":["import { getObjectForTheme } from \"discourse/lib/theme-settings-store\";\n\nexport const settings = getObjectForTheme(41);\n\nexport function themePrefix(key) {\n  return `theme_translations.41.${key}`;\n}\n","import { apiInitializer } from \"discourse/lib/api\";\n\nexport default apiInitializer(\"0.1\", (api) => {\n  api.onAppEvent(\"composer:opened\", () => {\n    const composerController = api.container.lookup(\"controller:composer\");\n\n    if (composerController) {\n      const model = composerController.get(\"model\");\n\n      const isCreating = model?.action === \"createTopic\";\n      const selectedCategoryId = model?.category?.id;\n      const allowedCategoryIds = [8]; // 🔁 Replace with your category IDs\n\n      if (isCreating && allowedCategoryIds.includes(selectedCategoryId)) {\n        model.set(\"showCustomTemplate\", true);\n        console.log(\"Topic is being created in an allowed category!\");\n      } else {\n        model.set(\"showCustomTemplate\", false);\n      }\n    }\n  });\n\n  api.renderInOutlet(\n    \"after-title-and-category\",\n    <template>\n      {{#if @model.showCustomTemplate}}\n        <blockquote>\n          Use this template to make your question clearer and easier to answer.\n          Feel free to remove any sections that don’t apply.\n        </blockquote>\n      {{/if}}\n    </template>\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","themeInitializer","apiInitializer","api","onAppEvent","composerController","container","lookup","model","get","isCreating","action","selectedCategoryId","category","id","includes","set","console","log","renderInOutlet","setComponentTemplate","createTemplateFactory","block","moduleName","isStrictMode","templateOnly","compatModules"],"mappings":";AAEwBA,EAAkB;;ACA1C,IAAAC;oCAAeC,CAAe,MAAQC,IACpCA,EAAIC,WAAW,kBAAmB,KAChC,MAAMC,EAAqBF,EAAIG,UAAUC,OAAO;AAEhD,GAAIF,EAAoB,CACtB,MAAMG,EAAQH,EAAmBI,IAAI,SAE/BC,EAA+B,gBAAlBF,GAAOG,OACpBC,EAAqBJ,GAAOK,UAAUC;AAGxCJ,GAFuB,CAAC,GAESK,SAASH,IAC5CJ,EAAMQ,IAAI,sBAAsB,GAChCC,QAAQC,IAAI,mDAEZV,EAAMQ,IAAI,sBAAsB,EAEpC,IAGFb,EAAIgB,eACF,2BAAAC,EAAAC,EAAA,CAAAP,GAAA,KAAAQ,MAAA,uQAAAC,WAAA,4BAAAC,cAAA,IAAAC;ACtBC,MAACC,EAAgB,CACpB;"}