import { basisToValue } from './basis-to-value.util' ; import { isPercent } from './is-percent.util' ; export function getMinMaxPct ( minBasis , maxBasis , grow , shrink , baseBasisPct , basisToPx ) { let minBasisPct = isPercent ( minBasis ) ? basisToValue ( minBasis ) : basisToValue ( minBasis ) / basisToPx ; let maxBasisPct = isPercent ( maxBasis ) ? basisToValue ( maxBasis ) : basisToValue ( maxBasis ) / basisToPx ; minBasisPct = Math . max ( minBasisPct || 0 , shrink === '0' ? baseBasisPct : 0 ) ; maxBasisPct = Math . min ( maxBasisPct || 100 , grow === '0' ? baseBasisPct : 100 ) ; return [ minBasisPct , maxBasisPct ] ; }