import { __ } from '@wordpress/i18n'; import Input from './Input'; import Select from './Select'; type ListStyleValue = 'none' | 'disc' | 'decimal'; type ListStyleCardProps = { title?: string; listStyle?: ListStyleValue; onListStyleChange?: ( value: ListStyleValue ) => void; listStyleDescription?: string; gap?: number; onGapChange?: ( value: number ) => void; gapDescription?: string; gapMin?: number; gapMax?: number; indent?: number; onIndentChange?: ( value: number ) => void; indentDescription?: string; indentMin?: number; indentMax?: number; indentLabel?: string; idPrefix: string; }; const ListStyleCard = ( { title, listStyle, onListStyleChange, listStyleDescription, gap, onGapChange, gapDescription, gapMin = 0, gapMax = 20, indent, onIndentChange, indentDescription, indentMin = 0, indentMax = 48, indentLabel, idPrefix, }: ListStyleCardProps ) => (

{ title ?? __( 'List', 'airygen-seo' ) }

{ typeof listStyle !== 'undefined' && onListStyleChange ? (
onGapChange( Math.max( gapMin, Math.min( gapMax, Number( value ) || 0 ) ) ) } id={ `${ idPrefix }-gap` } /> { gapDescription ?

{ gapDescription }

: null }
) : null } { typeof indent !== 'undefined' && onIndentChange ? (
onIndentChange( Math.max( indentMin, Math.min( indentMax, Number( value ) || 0 ) ) ) } id={ `${ idPrefix }-indent` } /> { indentDescription ?

{ indentDescription }

: null }
) : null }
); export default ListStyleCard;