export const  builderHorizontalAlignments = {
    left: {
        label: 'Gauche',
        classes: 'items-start text-left',
        buttonClasses: 'justify-start',
        fullWidthContent: false,
    },
    center: {
        label: 'Centré',
        classes: 'items-center text-center',
        buttonClasses: 'justify-center',
        fullWidthContent: false,
    },
    right: {
        label: 'Droite',
        classes: 'items-end text-right',
        buttonClasses: 'justify-end',
        fullWidthContent: false,
    },
    justify: {
        label: 'Justifié',
        classes: 'items-stretch text-justify',
        buttonClasses: 'justify-between',
        fullWidthContent: true,
    },
};

export const  builderVerticalAlignments = {
    top: { label: 'Haut', classes: 'justify-start' },
    center: { label: 'Centre', classes: 'justify-center' },
    bottom: { label: 'Bas', classes: 'justify-end' },
};

export const  builderSectionMaxWidths = {
    full: { label: 'Pleine largeur', classes: 'w-full max-w-none' },
    960: { label: '960px', classes: 'max-w-[960px]' },
    1120: { label: '1120px', classes: 'max-w-[1120px]' },
    1280: { label: '1280px', classes: 'max-w-[1280px]' },
    1440: { label: '1440px', classes: 'max-w-[1440px]' },
};

export const  builderSectionHorizontalPaddings = {
    0: { label: '0', classes: 'px-0' },
    32: { label: '32px', classes: 'px-4 md:px-8' },
    64: { label: '64px', classes: 'px-5 md:px-16' },
    96: { label: '96px', classes: 'px-6 md:px-24' },
};

export const  builderSectionMarginBottoms = {
    0: { label: '0', classes: 'mb-0' },
    48: { label: '48px', classes: 'mb-12' },
    96: { label: '96px', classes: 'mb-24' },
    128: { label: '128px', classes: 'mb-32' },
};

export const  builderContainerPaddings = {
    32: { label: '32px', classes: 'p-5 md:p-8' },
    48: { label: '48px', classes: 'p-6 md:p-12' },
    64: { label: '64px', classes: 'p-6 md:p-16' },
    96: { label: '96px', classes: 'p-8 md:p-24' },
};

export const  builderContainerMinHeights = {
    480: { label: '480px', classes: 'min-h-[480px]' },
    560: { label: '560px', classes: 'min-h-[560px]' },
    720: { label: '720px', classes: 'min-h-[720px]' },
    screen: { label: 'Plein écran', classes: 'min-h-screen' },
};

export const  builderBaseClasses = {
    section: 'mx-auto',
    container: 'relative box-border flex flex-col overflow-hidden rounded',
    background: 'absolute inset-0 bg-cover bg-center',
    eyebrow: 'relative z-[1] m-0 mb-4 text-xs font-bold uppercase tracking-[.22em] text-white/80',
    heading: 'relative z-[1] m-0 mb-6 max-w-[900px] font-serif text-[42px] font-medium italic leading-[1.08] text-white md:text-[64px]',
    text: 'relative z-[1] m-0 mb-10 max-w-[680px] text-base leading-[1.6] text-white/90 md:text-lg',
    buttons: 'relative z-[1] flex flex-wrap gap-5',
    primaryButton: 'inline-flex bg-[#5b1f2e] px-7 py-4 text-xs font-bold uppercase tracking-[.1em] text-white',
    secondaryButton: 'inline-flex border border-[#c8a96a] px-7 py-4 text-xs font-bold uppercase tracking-[.1em] text-white',
    fullWidthContent: 'w-full',
};

export function classOption(options, value, fallback) {
    const key = String(value ?? fallback);

    return options[key] || options[fallback];
}

export function classNames(...items) {
    return items.filter(Boolean).join(' ');
}
