import { html, css, cssManager } from '@design.estate/dees-element';

export const demoFunc = () => html`
  <style>
    .demo-container {
      display: flex;
      flex-direction: column;
      gap: 32px;
      padding: 48px;
      background: ${cssManager.bdTheme('#f8f9fa', '#0a0a0a')};
      min-height: 100vh;
    }

    .section {
      background: ${cssManager.bdTheme('#ffffff', '#18181b')};
      border: 1px solid ${cssManager.bdTheme('#e5e7eb', '#27272a')};
      border-radius: 8px;
      padding: 24px;
    }

    .section-title {
      font-size: 18px;
      font-weight: 600;
      margin-bottom: 16px;
      color: ${cssManager.bdTheme('#09090b', '#fafafa')};
    }

    .section-description {
      font-size: 14px;
      color: ${cssManager.bdTheme('#71717a', '#a1a1aa')};
      margin-bottom: 24px;
    }

    .token-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
      gap: 16px;
    }

    .token-item {
      background: ${cssManager.bdTheme('#f4f4f5', '#27272a')};
      border-radius: 6px;
      padding: 16px;
    }

    .token-name {
      font-family: 'Intel One Mono', monospace;
      font-size: 12px;
      color: ${cssManager.bdTheme('#71717a', '#a1a1aa')};
      margin-bottom: 8px;
    }

    .token-value {
      font-size: 14px;
      font-weight: 500;
      color: ${cssManager.bdTheme('#09090b', '#fafafa')};
    }

    .spacing-demo {
      display: flex;
      align-items: flex-end;
      gap: 8px;
      flex-wrap: wrap;
    }

    .spacing-box {
      background: ${cssManager.bdTheme('#3b82f6', '#3b82f6')};
      border-radius: 4px;
    }

    .radius-demo {
      display: flex;
      gap: 16px;
      flex-wrap: wrap;
    }

    .radius-box {
      width: 60px;
      height: 60px;
      background: ${cssManager.bdTheme('#3b82f6', '#3b82f6')};
      display: flex;
      align-items: center;
      justify-content: center;
      color: white;
      font-size: 11px;
      font-weight: 500;
    }

    .shadow-demo {
      display: flex;
      gap: 24px;
      flex-wrap: wrap;
    }

    .shadow-box {
      width: 100px;
      height: 100px;
      background: ${cssManager.bdTheme('#ffffff', '#27272a')};
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 12px;
      font-weight: 500;
      color: ${cssManager.bdTheme('#71717a', '#a1a1aa')};
    }

    .height-demo {
      display: flex;
      gap: 16px;
      align-items: flex-end;
      flex-wrap: wrap;
    }

    .height-box {
      background: ${cssManager.bdTheme('#3b82f6', '#3b82f6')};
      width: 120px;
      border-radius: 6px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: white;
      font-size: 12px;
      font-weight: 500;
    }
  </style>
  <div class="demo-container">
    <dees-theme>
      <div class="section">
        <div class="section-title">Spacing Scale</div>
        <div class="section-description">
          CSS variables: --dees-spacing-xs through --dees-spacing-3xl
        </div>
        <div class="spacing-demo">
          <div>
            <div class="spacing-box" style="width: var(--dees-spacing-xs); height: var(--dees-spacing-xs);"></div>
            <div class="token-name">xs (4px)</div>
          </div>
          <div>
            <div class="spacing-box" style="width: var(--dees-spacing-sm); height: var(--dees-spacing-sm);"></div>
            <div class="token-name">sm (8px)</div>
          </div>
          <div>
            <div class="spacing-box" style="width: var(--dees-spacing-md); height: var(--dees-spacing-md);"></div>
            <div class="token-name">md (12px)</div>
          </div>
          <div>
            <div class="spacing-box" style="width: var(--dees-spacing-lg); height: var(--dees-spacing-lg);"></div>
            <div class="token-name">lg (16px)</div>
          </div>
          <div>
            <div class="spacing-box" style="width: var(--dees-spacing-xl); height: var(--dees-spacing-xl);"></div>
            <div class="token-name">xl (24px)</div>
          </div>
          <div>
            <div class="spacing-box" style="width: var(--dees-spacing-2xl); height: var(--dees-spacing-2xl);"></div>
            <div class="token-name">2xl (32px)</div>
          </div>
          <div>
            <div class="spacing-box" style="width: var(--dees-spacing-3xl); height: var(--dees-spacing-3xl);"></div>
            <div class="token-name">3xl (48px)</div>
          </div>
        </div>
      </div>

      <div class="section">
        <div class="section-title">Border Radius Scale</div>
        <div class="section-description">
          CSS variables: --dees-radius-xs through --dees-radius-full
        </div>
        <div class="radius-demo">
          <div>
            <div class="radius-box" style="border-radius: var(--dees-radius-xs);">xs</div>
            <div class="token-name">2px</div>
          </div>
          <div>
            <div class="radius-box" style="border-radius: var(--dees-radius-sm);">sm</div>
            <div class="token-name">4px</div>
          </div>
          <div>
            <div class="radius-box" style="border-radius: var(--dees-radius-md);">md</div>
            <div class="token-name">6px</div>
          </div>
          <div>
            <div class="radius-box" style="border-radius: var(--dees-radius-lg);">lg</div>
            <div class="token-name">8px</div>
          </div>
          <div>
            <div class="radius-box" style="border-radius: var(--dees-radius-xl);">xl</div>
            <div class="token-name">12px</div>
          </div>
          <div>
            <div class="radius-box" style="border-radius: var(--dees-radius-full);">full</div>
            <div class="token-name">999px</div>
          </div>
        </div>
      </div>

      <div class="section">
        <div class="section-title">Shadow Elevation Scale</div>
        <div class="section-description">
          CSS variables: --dees-shadow-xs through --dees-shadow-lg
        </div>
        <div class="shadow-demo">
          <div>
            <div class="shadow-box" style="box-shadow: var(--dees-shadow-xs);">xs</div>
            <div class="token-name">minimal</div>
          </div>
          <div>
            <div class="shadow-box" style="box-shadow: var(--dees-shadow-sm);">sm</div>
            <div class="token-name">subtle</div>
          </div>
          <div>
            <div class="shadow-box" style="box-shadow: var(--dees-shadow-md);">md</div>
            <div class="token-name">medium</div>
          </div>
          <div>
            <div class="shadow-box" style="box-shadow: var(--dees-shadow-lg);">lg</div>
            <div class="token-name">prominent</div>
          </div>
        </div>
      </div>

      <div class="section">
        <div class="section-title">Control Height Scale</div>
        <div class="section-description">
          CSS variables: --dees-control-height-sm through --dees-control-height-xl
        </div>
        <div class="height-demo">
          <div>
            <div class="height-box" style="height: var(--dees-control-height-sm);">sm</div>
            <div class="token-name">32px</div>
          </div>
          <div>
            <div class="height-box" style="height: var(--dees-control-height-md);">md</div>
            <div class="token-name">36px</div>
          </div>
          <div>
            <div class="height-box" style="height: var(--dees-control-height-lg);">lg</div>
            <div class="token-name">40px</div>
          </div>
          <div>
            <div class="height-box" style="height: var(--dees-control-height-xl);">xl</div>
            <div class="token-name">48px</div>
          </div>
        </div>
      </div>

      <div class="section">
        <div class="section-title">Transition Durations</div>
        <div class="section-description">
          CSS variables: --dees-transition-fast through --dees-transition-slower
        </div>
        <div class="token-grid">
          <div class="token-item">
            <div class="token-name">--dees-transition-fast</div>
            <div class="token-value">0.1s</div>
          </div>
          <div class="token-item">
            <div class="token-name">--dees-transition-default</div>
            <div class="token-value">0.15s</div>
          </div>
          <div class="token-item">
            <div class="token-name">--dees-transition-slow</div>
            <div class="token-value">0.2s</div>
          </div>
          <div class="token-item">
            <div class="token-name">--dees-transition-slower</div>
            <div class="token-value">0.3s</div>
          </div>
        </div>
      </div>
    </dees-theme>
  </div>
`;
