import { Options as CSSBlocksOptions , ResolvedConfiguration , StyleMapping , resolveConfiguration , } from "@css-blocks/core" ; import { ObjectDictionary } from "@opticss/util" ; import { TEMPLATE_TYPE } from "../Analyzer/Template" ; export interface RewriterOptions { meta ? : ObjectDictionary < unknown > ; cssBlocks : { styleMapping : StyleMapping < TEMPLATE_TYPE > | null ; compilationOptions : CSSBlocksOptions ; } ; } export class CSSBlocksJSXTransformer { styleMapping : StyleMapping < TEMPLATE_TYPE > | null ; cssBlockOptions : ResolvedConfiguration ; blocks : ObjectDictionary < StyleMapping < TEMPLATE_TYPE > > = { } ; constructor ( opts ? ) { this . cssBlockOptions = resolveConfiguration ( opts && opts . cssBlocks && opts . cssBlocks . compilationOptions ) ; this . styleMapping = opts && opts . cssBlocks && opts . cssBlocks . styleMapping || null ; } }