null as any}
uniqueId={props.uniqueId + "_amount"}
label={props.i18nPayment.amount}
placeholder={props.i18nPayment.amount}
args={{
InputProps: props.args.InputPropsAmount,
fieldVariant: props.args.fieldVariantAmount,
}}
autoFocus={props.autoFocus}
canRestore={false}
currentAppliedValue={props.currentAppliedValue && {
value: props.currentAppliedValue.amount,
currency: props.currentAppliedValue.currency,
}}
currentTextualValue={props.currentTextualValueOfAmount}
currentValid={props.currentValid}
currentValue={props.currentValue && {
value: props.currentValue.amount,
currency: props.currentValue.currency,
}}
disabled={props.disabled}
enableUserSetErrors={props.enableUserSetErrors}
isNumericType={true}
onChange={props.onAmountChange}
onChangeByTextualValue={props.onAmountChangeByTextualValue}
onRestore={null}
propertyId={props.propertyId + "-amount"}
rtl={props.rtl}
type="currency"
currency={props.currency}
currencyAvailable={props.currencyAvailable}
currencyFormat={props.currencyFormat}
currencyI18n={props.currencyI18n}
onChangeCurrency={props.onCurrencyChange}
language={props.language}
languageOverride={props.languageOverride}
/>
) : null;
fieldComponent = props.args.useCustomInternalFieldRender ?
props.args.useCustomInternalFieldRender(typePaymentSelector, statusPaymentSelector, amountEntry) :
(
<>
{typePaymentSelector}
{statusPaymentSelector}
{amountEntry}
>
);
}
const labelComponent = (
props.label ?
{secondIconComponent}
{capitalize(props.label)}
{iconComponent}
: null
);
let descriptionObject: React.ReactNode = null;
if (props.description) {
descriptionObject = descriptionAsAlert ? (
{props.description}
) : (
{props.description}
);
}
const error = props.args.hideError ? null :
{props.currentInvalidReason}
;
let inner: React.ReactNode;
if (props.args.useCustomFieldRender) {
inner = props.args.useCustomFieldRender(descriptionObject, labelComponent, fieldComponent, error, props.disabled);
} else {
inner = (
<>
{descriptionObject}
{labelComponent}
{fieldComponent}
{error}
>
)
}
return (
{inner}
);
};
export default PropertyEntryPaymentRenderer;