import styled, {} from '@darajs/styled-components';
const BaseRawCssInject = styled.div `
    ${(props) => props.$rawCss}
`;
/**
 * Helper method to wrap a component into a styled component with $rawCss prop
 *
 * @param component component to inject $rawCss into
 */
export function injectCss(component) {
    // raw html components
    if (typeof component === 'string') {
        // For div just re-use the base
        if (component === 'div') {
            // Have to cast it as otherwise typescript complaints 'div' is too specific compared to type `C`
            return BaseRawCssInject;
        }
        // Otherwise re-use base but change the html tag
        return BaseRawCssInject.withComponent(component);
    }
    return styled(component) `
        ${(props) => props.$rawCss}
    `;
}
//# sourceMappingURL=inject-css.js.map