import { IS_BROWSER } from 'fresh/runtime' import { styles } from './SmartStylesheetCommon.tsx' /** * Generate a css scope for the given component/island based on its name. * * @param component - Component or island to scope. * @returns scope - css scope class. * * @example * ```ts * // ./(components|islands)/Button.tsx * import type { JSX } from 'preact' * import { getStyleScope, useSmartStylesheet } from './SmartStylesheet.tsx' * * const scope = getStyleScope(Button) * * export function Button(props: JSX.ButtonHTMLAttributes) { * useSmartStylesheet(import.meta, { scope }) * * return