import { State } from './state' ; import { getClassNameParts } from './getClassNameAtPosition' ; import removeMeta from './removeMeta' ; const dlv = require ( 'dlv' ) ; export function getClassNameDecls ( state , className ) { const parts = getClassNameParts ( state , className ) ; if ( ! parts ) return null ; const info = dlv ( state . classNames . classNames , [ ... parts , '__info' ] ) ; if ( Array . isArray ( info ) ) { return info . map ( removeMeta ) ; } return removeMeta ( info ) ; }