// types.ts
import { ModuleEditProps } from '@divi/module-library';
import {
	InternalAttrs,
	FormatBreakpointStateAttr,
	type Element,
} from '@divi/types';

import type {
	AttrVal,
	BorderValue,
	TypographyValue,
	SpacingValue,
} from '../custom-types';

type BaseDecoration = Element.Decoration.PickedAttributes<
	| 'animation'
	| 'background'
	| 'border'
	| 'boxShadow'
	| 'disabledOn'
	| 'filters'
	| 'overflow'
	| 'position'
	| 'scroll'
	| 'sizing'
	| 'spacing'
	| 'sticky'
	| 'transform'
	| 'transition'
	| 'zIndex'
	>;

type DecorationExtras = {
	filtersPosition?: FormatBreakpointStateAttr<AttrVal>;
	spaceBetweenHorizontal?: FormatBreakpointStateAttr<AttrVal>;
	filtersListAlignment?: FormatBreakpointStateAttr<AttrVal>;
	itemsSpaceBetween?: FormatBreakpointStateAttr<AttrVal>;
	subItemsOffsetLeft?: FormatBreakpointStateAttr<AttrVal>;
	showDecorator?: FormatBreakpointStateAttr<AttrVal>;
	itemNormalColor?: FormatBreakpointStateAttr<AttrVal>;
	itemNormalBackgroundColor?: FormatBreakpointStateAttr<AttrVal>;
	itemHoverColor?: FormatBreakpointStateAttr<AttrVal>;
	itemHoverBackgroundColor?: FormatBreakpointStateAttr<AttrVal>;
	itemCheckedColor?: FormatBreakpointStateAttr<AttrVal>;
	itemCheckedBackgroundColor?: FormatBreakpointStateAttr<AttrVal>;
	itemBorder?: FormatBreakpointStateAttr<BorderValue>;
	itemTypography?: FormatBreakpointStateAttr<TypographyValue>;
	itemSpacing?: FormatBreakpointStateAttr<SpacingValue>;
	radioSize?: FormatBreakpointStateAttr<AttrVal>;
	radioTopOffset?: FormatBreakpointStateAttr<AttrVal>;
	radioLabelOffset?: FormatBreakpointStateAttr<AttrVal>;
	checkedIconSize?: FormatBreakpointStateAttr<AttrVal>;
	checkedIconColor?: FormatBreakpointStateAttr<AttrVal>;
	radioNormalBackgroundColor?: FormatBreakpointStateAttr<AttrVal>;
	radioCheckedBackgroundColor?: FormatBreakpointStateAttr<AttrVal>;
	radioBorder?: FormatBreakpointStateAttr<BorderValue>;
	labelTypography?: FormatBreakpointStateAttr<TypographyValue>;
	labelAlignment?: FormatBreakpointStateAttr<AttrVal>;
	labelColor?: FormatBreakpointStateAttr<AttrVal>;
	labelGapY?: FormatBreakpointStateAttr<AttrVal>;
	applyTypography?: FormatBreakpointStateAttr<TypographyValue>;
	applyAlignment?: FormatBreakpointStateAttr<AttrVal>;
	applyNormalColor?: FormatBreakpointStateAttr<AttrVal>;
	applyNormalBgColor?: FormatBreakpointStateAttr<AttrVal>;
	applyHoverColor?: FormatBreakpointStateAttr<AttrVal>;
	applyHoverBgColor?: FormatBreakpointStateAttr<AttrVal>;
	applyBorder?: FormatBreakpointStateAttr<BorderValue>;
	applySpacing?: FormatBreakpointStateAttr<SpacingValue>;
	searchItemsWidth?: FormatBreakpointStateAttr<AttrVal>;
	searchItemsTypography?: FormatBreakpointStateAttr<TypographyValue>;
	searchItemsColor?: FormatBreakpointStateAttr<AttrVal>;
	searchItemsBackgroundColor?: FormatBreakpointStateAttr<AttrVal>;
	searchInputBorder?: FormatBreakpointStateAttr<BorderValue>;
	searchInputPadding?: FormatBreakpointStateAttr<SpacingValue>;
	searchInputMargin?: FormatBreakpointStateAttr<SpacingValue>;
	searchRemoveNormalColor?: FormatBreakpointStateAttr<AttrVal>;
	searchRemoveHoverColor?: FormatBreakpointStateAttr<AttrVal>;
	searchRemoveSize?: FormatBreakpointStateAttr<AttrVal>;
	searchRemoveRightOffset?: FormatBreakpointStateAttr<AttrVal>;
	moreLessButtonTypography?: FormatBreakpointStateAttr<TypographyValue>;
	moreLessButtonNormalColor?: FormatBreakpointStateAttr<AttrVal>;
	moreLessButtonNormalBackgroundColor?: FormatBreakpointStateAttr<AttrVal>;
	moreLessButtonHoverColor?: FormatBreakpointStateAttr<AttrVal>;
	moreLessButtonHoverBackgroundColor?: FormatBreakpointStateAttr<AttrVal>;
	moreLessButtonHoverBorderColor?: FormatBreakpointStateAttr<AttrVal>;
	moreLessButtonBorder?: FormatBreakpointStateAttr<BorderValue>;
	moreLessButtonPadding?: FormatBreakpointStateAttr<SpacingValue>;
	moreLessBackgroundColor?: FormatBreakpointStateAttr<AttrVal>;
	moreLessBorder?: FormatBreakpointStateAttr<BorderValue>;
	moreLessPadding?: FormatBreakpointStateAttr<SpacingValue>;
	moreLessButtonAlignment?: FormatBreakpointStateAttr<AttrVal>;
	dropdownWidth?: FormatBreakpointStateAttr<AttrVal>;
	dropdownLabelTypography?: FormatBreakpointStateAttr<TypographyValue>;
	dropdownLabelColor?: FormatBreakpointStateAttr<AttrVal>;
	dropdownLabelBackgroundColor?: FormatBreakpointStateAttr<AttrVal>;
	dropdownLabelBorder?: FormatBreakpointStateAttr<BorderValue>;
	dropdownLabelPadding?: FormatBreakpointStateAttr<SpacingValue>;
	dropdownBodyOffset?: FormatBreakpointStateAttr<AttrVal>;
	dropdownBodyBorder?: FormatBreakpointStateAttr<BorderValue>;
	dropdownBodyBackgroundColor?: FormatBreakpointStateAttr<AttrVal>;
	dropdownBodyItemsPadding?: FormatBreakpointStateAttr<SpacingValue>;
	dropdownFooterBackgroundColor?: FormatBreakpointStateAttr<AttrVal>;
	dropdownFooterBorder?: FormatBreakpointStateAttr<BorderValue>;
	dropdownFooterMargin?: FormatBreakpointStateAttr<SpacingValue>;
	dropdownFooterPadding?: FormatBreakpointStateAttr<SpacingValue>;
	dropdownFooterAlignment?: FormatBreakpointStateAttr<AttrVal>;
};

export interface RadioFilterAttrs extends InternalAttrs {
	module?: {
		meta?: Element.Meta.Attributes;
		advanced?: {
			link?: Element.Advanced.Link.Attributes;
			htmlAttributes?: Element.Advanced.IdClasses.Attributes;
			text?: Element.Advanced.Text.Attributes;
		};
		decoration?: BaseDecoration & DecorationExtras;
	};
	[key: string]: any;
}

export type RadioFilterEditProps = ModuleEditProps<RadioFilterAttrs>;
