import type { MediaQueryConfig, Devices } from 'config'
import { devices as maxDevices } from 'config'

const minDevices: MediaQueryConfig = {
  desktop: '(min-width: 1281px)',
  laptop: '(min-width: 1025px)',
  large: '(min-width: 1900px)',
  mobile: '(min-width: 0px)',
  tablet: '(min-width: 641px)',
}

export const getQuery = (maxDevice?: Devices, minDevice?: Devices) => {
  if (maxDevice) return maxDevices[maxDevice]
  if (minDevice) return minDevices[minDevice]
  return ''
}
