{
  "version": 3,
  "sources": ["../src/with-global-styles-provider.tsx"],
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport type { GlobalStylesConfig } from '@wordpress/global-styles-engine';\n\n/**\n * Internal dependencies\n */\nimport { GlobalStylesProvider } from './provider';\n\ninterface GlobalStylesProviderProps {\n\tvalue: GlobalStylesConfig;\n\tbaseValue: GlobalStylesConfig;\n\tonChange: ( config: GlobalStylesConfig ) => void;\n}\n\n/**\n * Higher-order component that wraps a component with GlobalStylesProvider.\n * This allows components to access GlobalStylesContext without exposing\n * the provider directly in the public API.\n *\n * @param Component - The component to wrap\n * @return A wrapped component that accepts value, baseValue, and onChange props\n */\nexport function withGlobalStylesProvider< P extends object >(\n\tComponent: React.ComponentType< P >\n) {\n\treturn function WrappedComponent( {\n\t\tvalue,\n\t\tbaseValue,\n\t\tonChange,\n\t\t...props\n\t}: P & GlobalStylesProviderProps ) {\n\t\treturn (\n\t\t\t<GlobalStylesProvider\n\t\t\t\tvalue={ value }\n\t\t\t\tbaseValue={ baseValue }\n\t\t\t\tonChange={ onChange }\n\t\t\t>\n\t\t\t\t<Component { ...( props as P ) } />\n\t\t\t</GlobalStylesProvider>\n\t\t);\n\t};\n}\n"],
  "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,sBAAqC;AA+BjC;AAfG,SAAS,yBACf,WACC;AACD,SAAO,SAAS,iBAAkB;AAAA,IACjC;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACJ,GAAmC;AAClC,WACC;AAAA,MAAC;AAAA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QAEA,sDAAC,aAAY,GAAK,OAAe;AAAA;AAAA,IAClC;AAAA,EAEF;AACD;",
  "names": []
}
