// Shared: single source of truth for common Divi value shapes

export type AttrVal = { value: string } & Record<string, any>;

// Border control payload
export type BorderValue = {
	styles?: {
		all?: {
			width?: string;
			color?: string;
			style?: string;
		};
	};
	radius?: {
		topLeft?: string;
		topRight?: string;
		bottomLeft?: string;
		bottomRight?: string;
		sync?: 'on' | 'off';
	};
};

// Typography control payload
export type TypographyValue = {
	fontSize?: string;
	lineHeight?: string;
	letterSpacing?: string;
	fontWeight?: string | number;
	textTransform?: string;
	textDecoration?: string;
	fontStyle?: string;
	fontFamily?: string;
	color?: string;
};

// Spacing control payload
export type SpacingSides = {
	top?: string;
	right?: string;
	bottom?: string;
	left?: string;
	syncHorizontal?: 'on' | 'off';
	syncVertical?: 'on' | 'off';
};

export type SpacingValue = {
	margin?: SpacingSides;
	padding?: SpacingSides;
};