import { SystemProp, VariantsType } from '@xstyled/system'
import * as CSS from 'csstype'

import { VuiTheme } from '../theme'
import { AnyString } from '../utils'

export type ShadowGetter = VariantsType<VuiTheme['shadows']>

type OpacityProp = SystemProp<CSS.Property.Opacity, VuiTheme>
export type OpacityProps = {
  opacity?: OpacityProp
  hoverOpacity?: OpacityProp
}

type BoxShadowProp = SystemProp<ShadowGetter | AnyString, VuiTheme>
export type BoxShadowProps = {
  boxShadow?: BoxShadowProp
  elevation?: BoxShadowProp
  hoverBoxShadow?: BoxShadowProp
}

type TextShadowProp = SystemProp<ShadowGetter | AnyString, VuiTheme>
export type TextShadowProps = {
  textShadow?: TextShadowProp
}

export type EffectsProps = OpacityProps & BoxShadowProps & TextShadowProps
