Object.defineProperty(exports,"__esModule",{value:true});exports.useResolvedFontFamily=useResolvedFontFamily;var _useTheme2=require("./useTheme");function useResolvedFontFamily(props){var fontFamily=props.fontFamily,_props$fontStyle=props.fontStyle,fontStyle=_props$fontStyle===void 0?'normal':_props$fontStyle,_props$fontWeight=props.fontWeight,fontWeight=_props$fontWeight===void 0?400:_props$fontWeight;var newFontFamily=fontFamily;var newFontStyle=fontStyle;var newFontWeight=fontWeight;var _useTheme=(0,_useTheme2.useTheme)(),fontConfig=_useTheme.fontConfig,fontWeights=_useTheme.fontWeights,fonts=_useTheme.fonts;if(fontFamily&&fontFamily in fonts){newFontWeight=undefined;newFontStyle=undefined;var fontToken=fonts[fontFamily];if(fontConfig&&fontConfig[fontToken]){var fontWeightNumber=fontWeight in fontWeights?fontWeights[fontWeight]:fontWeight;var fontVariant=fontConfig[fontToken][fontWeightNumber];if(typeof fontVariant==='object'){if(fontVariant[fontStyle])newFontFamily=fontVariant[fontStyle];}else{newFontFamily=fontVariant;}}else{newFontFamily=fonts[fontFamily];}}return{fontFamily:newFontFamily,fontWeight:newFontWeight,fontStyle:newFontStyle};}
//# sourceMappingURL=useResolvedFontFamily.js.map