// @bun
var{defineProperty:x,getOwnPropertyNames:B,getOwnPropertyDescriptor:F}=Object,G=Object.prototype.hasOwnProperty;function I(b){return this[b]}var V=(b)=>{var g=(z??=new WeakMap).get(b),j;if(g)return g;if(g=x({},"__esModule",{value:!0}),b&&typeof b==="object"||typeof b==="function"){for(var q of B(b))if(!G.call(g,q))x(g,q,{get:I.bind(b,q),enumerable:!(j=F(b,q))||j.enumerable})}return z.set(b,g),g},z;var J=(b)=>b;function L(b,g){this[b]=J.bind(null,g)}var X=(b,g)=>{for(var j in g)x(b,j,{get:g[j],enumerable:!0,configurable:!0,set:L.bind(g,j)})};var P=(b,g)=>()=>(b&&(g=b(b=0)),g);var Z=import.meta.require;function f(){return`
    /* Theme selector for code blocks */
    .theme-selector {
      margin: 1rem 0;
      padding: 0.5rem;
      background: #f8f8f8;
      border-radius: 4px;
      text-align: right;
    }
    select {
      padding: 0.25rem 0.5rem;
      border-radius: 3px;
      border: 1px solid #ddd;
    }

    /* Dark mode body styles */
    body.dark-mode {
      background-color: #121212;
      color: #e1e4e8;
    }

    body.dark-mode h1,
    body.dark-mode h2,
    body.dark-mode h3 {
      color: #e1e4e8;
      border-color: #2f363d;
    }

    body.dark-mode .theme-selector {
      background: #2f363d;
      color: #e1e4e8;
    }

    body.dark-mode select {
      background: #24292e;
      color: #e1e4e8;
      border-color: #444;
    }

    body.dark-mode blockquote {
      background: #24292e;
      color: #e1e4e8;
    }

    body.dark-mode .frontmatter {
      background: #24292e;
    }

    body.dark-mode a {
      color: #58a6ff;
    }`}function A(b){return`
  <div class="theme-selector">
    Theme:
    <select id="themeSelector" onchange="changeTheme()">
      ${b}
    </select>
  </div>`}function C(){return`
    function changeTheme() {
      const theme = document.getElementById('themeSelector').value;

      // Toggle dark mode class based on theme
      // Dark themes typically include these keywords in their names
      if (theme.includes('dark') || theme.includes('night') || theme.includes('monokai') ||
          theme.includes('dracula') || theme.includes('nord') || theme.includes('material')) {
        document.body.classList.add('dark-mode');
      }
else {
        document.body.classList.remove('dark-mode');
      }
    }

    // Initialize theme on page load
    document.addEventListener('DOMContentLoaded', changeTheme);`}function H(b){if(Object.keys(b).length===0)return"";return`
  <div class="frontmatter">
    <h3>Frontmatter</h3>
    ${Object.entries(b).map(([g,j])=>`
    <div class="frontmatter-item">
      <span class="frontmatter-label">${g}:</span>
      <span>${Array.isArray(j)?j.join(", "):String(j)}</span>
    </div>`).join("")}
  </div>`}function M(b){let g=b.toLowerCase();return Q.some((j)=>g.includes(j))}var Q;var U=P(()=>{Q=["dark","night","monokai","dracula","nord","material","ayu","one-dark","tokyo","gruvbox","solarized-dark"]});U();export{M as isDarkTheme,f as getThemeSelectorStyles,C as getThemeSelectorScript,A as getThemeSelectorHtml,H as getFrontmatterHtml,Q as DARK_THEME_KEYWORDS};
