export const getMergedClassNames = (styles1: { [key: string]: string }, styles2?: { [key: string]: string }) => {
  if (!styles2) {
    return { ...styles1 }
  }
  const result: { [key: string]: string } = { ...styles1 }
  Object.keys(styles2).forEach((k) => {
    if (k in result) {
      result[k] = `${result[k]} ${styles2[k]}`
    } else {
      result[k] = styles2[k]
    }
  })
  return result
}

export const getClassName = (className: string, classNames?: { [key: string]: string }) => {
  return `${classNames ? classNames[className] ?? '' : ''} zocks__${className}`.trim()
}
