import React from 'react'
const RESOLUTION_TIERS = [
{ label: '8K', width: 7680, height: 4320, tone: 'amber' },
{ label: '5K', width: 5120, height: 2880, tone: 'violet' },
{ label: '4K', width: 3840, height: 2160, tone: 'sky' },
{ label: 'QHD', width: 2560, height: 1440, tone: 'emerald' },
{ label: 'Full HD', width: 1920, height: 1080, tone: 'cyan' },
{ label: 'HD', width: 1280, height: 720, tone: 'slate' },
]
const ASPECT_RATIOS = [
{ label: '21:9', ratio: 21 / 9 },
{ label: '16:10', ratio: 16 / 10 },
{ label: '16:9', ratio: 16 / 9 },
{ label: '3:2', ratio: 3 / 2 },
{ label: '4:3', ratio: 4 / 3 },
{ label: '1:1', ratio: 1 },
{ label: '4:5', ratio: 4 / 5 },
{ label: '3:4', ratio: 3 / 4 },
{ label: '9:16', ratio: 9 / 16 },
]
const TONE_CLASSES = {
amber: 'border-amber-400/25 bg-amber-400/10 text-amber-100',
violet: 'border-violet-400/25 bg-violet-400/10 text-violet-100',
sky: 'border-sky-400/25 bg-sky-400/10 text-sky-100',
emerald: 'border-emerald-400/25 bg-emerald-400/10 text-emerald-100',
cyan: 'border-cyan-400/25 bg-cyan-400/10 text-cyan-100',
slate: 'border-white/10 bg-white/[0.04] text-white/80',
}
function ScreenIcon({ className }) {
return (
)
}
function RatioIcon({ className }) {
return (
)
}
function FormatIcon({ className, variant }) {
if (variant === 'ultrawide') {
return (
)
}
if (variant === 'vertical') {
return (
)
}
return (
)
}
function OrientationIcon({ className, orientation }) {
if (orientation === 'square') {
return (
)
}
if (orientation === 'portrait') {
return (
)
}
return (
)
}
function Badge({ label, tone, icon }) {
return (
{icon}
{label}
)
}
function pickResolutionTier(width, height) {
const longSide = Math.max(width, height)
const shortSide = Math.min(width, height)
for (const tier of RESOLUTION_TIERS) {
if (longSide >= tier.width && shortSide >= tier.height) {
return tier
}
}
return null
}
function pickOrientation(width, height) {
if (width === height) {
return {
key: 'orientation-square',
label: 'Square',
tone: 'amber',
icon: