import { defineConfig, presetUno, presetIcons } from "unocss";

export default defineConfig({
  cli: {
    entry: {
      patterns: ["crates/dashboard-client/src/**/*.rs"],
      outFile: "target/site/styles/app.css",
    },
  },
  shortcuts: {
    "dash-card": "bg-white dark:bg-gray-800 rounded-lg shadow-md p-6 transition-colors duration-200",
    "dash-btn-primary": "px-4 py-2 rounded-md bg-blue-600 text-white hover:bg-blue-700 transition-colors duration-200 font-medium",
    "dash-container": "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",
  },
  theme: {
    colors: {
      // Extend default colors if needed
    },
  },
  presets: [
    presetUno(),
    presetIcons({
      extraProperties: {
        display: "inline-block",
        "vertical-align": "middle",
      },
    }),
  ],
  safelist: [
    // Ensure core classes are always generated
    "dark",
    "light",
    "flex",
    "grid",
    "hidden",
    "block",
    "inline",
    "min-h-screen",
    "bg-gray-50",
    "bg-gray-900",
    "transition-colors",
    "duration-200",
  ],
});
