import { __ } from '@wordpress/i18n'; import FourDirectionInputGroup from './FourDirectionInputGroup'; import Input from './Input'; import Select from './Select'; import TransparentColorPicker from './TransparentColorPicker'; type DirectionValues = { top: number; right: number; bottom: number; left: number; }; type BorderStyle = 'solid' | 'dashed' | 'dotted'; type SectionBodyContainerStyleCardProps = { title?: string; borderWidths: DirectionValues; onBorderWidthsChange: ( value: DirectionValues ) => void; borderRadius: number; onBorderRadiusChange: ( value: number ) => void; borderStyle: BorderStyle; onBorderStyleChange: ( value: BorderStyle ) => void; borderColor: string; onBorderColorChange: ( value: string ) => void; paddings: DirectionValues; onPaddingsChange: ( value: DirectionValues ) => void; margins?: DirectionValues; onMarginsChange?: ( value: DirectionValues ) => void; bgColor: string; onBgColorChange: ( value: string ) => void; gap?: number; onGapChange?: ( value: number ) => void; idPrefix: string; maxBorderWidth?: number; maxSpacing?: number; maxRadius?: number; maxGap?: number; showMargins?: boolean; gapLabel?: string; gapDescription?: string; }; const SectionBodyContainerStyleCard = ( { title, borderWidths, onBorderWidthsChange, borderRadius, onBorderRadiusChange, borderStyle, onBorderStyleChange, borderColor, onBorderColorChange, paddings, onPaddingsChange, margins, onMarginsChange, bgColor, onBgColorChange, gap, onGapChange, idPrefix, maxBorderWidth = 20, maxSpacing = 50, maxRadius = 50, maxGap = 64, showMargins = true, gapLabel, gapDescription, }: SectionBodyContainerStyleCardProps ) => { return (

{ title ?? __( 'Section body container', 'airygen-seo' ) }

{ __( 'Background color for the container area.', 'airygen-seo' ) }

{ __( 'Sets the border color for the container.', 'airygen-seo' ) }

onBorderRadiusChange( Math.max( 0, Math.min( maxRadius, Number( value ) || 0 ) ), ) } />

{ __( 'Controls how rounded the container corners appear.', 'airygen-seo' ) }

{ `${ __( 'Padding', 'airygen-seo' ) } (px)` }

{ __( 'Padding inside the container.', 'airygen-seo' ) }

{ showMargins && margins && onMarginsChange ? (

{ `${ __( 'Margin', 'airygen-seo' ) } (px)` }

{ __( 'Space outside the container.', 'airygen-seo' ) }

) : null }

{ `${ __( 'Border width', 'airygen-seo' ) } (px)` }

{ __( 'Adjust the thickness of the container border.', 'airygen-seo' ) }

{ typeof gap !== 'undefined' && onGapChange ? (
onGapChange( Math.max( 0, Math.min( maxGap, Number( value ) || 0 ) ) ) } /> { gapDescription ?

{ gapDescription }

: null }
) : null }
); }; export default SectionBodyContainerStyleCard;