@props(['name', 'label' => null, 'type' => 'text', 'value' => null, 'required' => false, 'hint' => null, 'placeholder' => null, 'ltr' => false, 'step' => null, 'jalali' => false, 'money' => null])
@php
// An amount field shows its number in groups of three (1,250,000). A field
// with a decimal step is a weight, a percentage or a count of hours, so it
// keeps its own format.
$isMoney = $money ?? ($type === 'number' && $step !== null && ctype_digit((string) $step) && (int) $step >= 100);
$raw = old($name, $value);
$moneyValue = $isMoney && $raw !== null && $raw !== '' ? \App\Support\Dec::format($raw, 0) : '';
@endphp
@if ($jalali)
{{ $message }}
@enderror @if ($hint){{ $hint }}
@endif