import { getConfig } from '../config'
import type { Shorthands } from '../types'
/**
* @deprecated use useProps instead
*/
export function getExpandedShorthands(
props: A
): Omit {
const shorthands = getConfig().shorthands
if (!shorthands) return props
const res = {} as A
for (const key in props) {
// @ts-ignore
res[shorthands[key] || key] = props[key]
}
return res
}
export function getExpandedShorthand(propKey: string, props: object) {
const shorthands = getConfig().inverseShorthands
return props[propKey] ?? props[shorthands[propKey]]
}