import { DESIGN_WIDTH } from '@/constants/app'

/** px to vw */
const useVW = (px: string | number): `${string | number}px` => {
  // const pixel = `${px}`.replace(/px$/, '')
  // return `${-((-pixel / DESIGN_WIDTH) * 100).toFixed(5)}vw`
  return `${px}px`
}

export const usePX = (px: string | number): `${string | number}px` => {
  // const pixel = `${px}`.replace(/px$/, '')
  // return `${+pixel * (document.documentElement.clientWidth / DESIGN_WIDTH)}px`
  return `${px}px`
}

export default useVW
