import { html } from '@design.estate/dees-element';
import { EcoScreensaver } from './eco-screensaver.js';

export const demo = () => {
  // Clean up any existing instance first
  if (EcoScreensaver.instance) {
    EcoScreensaver.instance.remove();
    EcoScreensaver.instance = null;
  }

  return html`
    <eco-screensaver .delay=${2000}></eco-screensaver>
    <div style="padding: 24px; color: #888;">
      Screensaver activates after 2 seconds of inactivity.<br>
      Move mouse or press keys to reset timer.
    </div>
  `;
};
