/*
 * CoolerControl - monitor and control your cooling and other devices
 * Copyright (c) 2021-2025  Guy Boldon and contributors
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */

export default {
    root: ({ props }) => ({
        class: [
            //Font
            'text-xs font-bold',

            //Alignments
            'inline-flex items-center justify-center',

            //Spacing
            'px-2 py-1',

            //Shape
            {
                'rounded-lg': !props.rounded,
                'rounded-full': props.rounded,
            },

            //Colors
            'text-text-color',
            {
                'bg-accent/40': props.severity == null || props.severity === 'primary',
                'bg-border-one': props.severity === 'secondary',
                'bg-green/40': props.severity === 'success',
                'bg-blue/40': props.severity === 'info',
                'bg-yellow/40': props.severity === 'warn',
                'bg-red/40': props.severity === 'danger',
            },
        ],
    }),
    value: {
        class: 'leading-normal',
    },
    icon: {
        class: 'mr-1 text-sm',
    },
}
