@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) @else
@if ($label) @endif @if ($isMoney) merge(['class' => 'input '.($errors->has($name) ? 'input-error' : '')]) }} @if ($required) required @endif > @else merge(['class' => 'input '.($errors->has($name) ? 'input-error' : '')]) }} @if ($required) required @endif > @endif @error($name)

{{ $message }}

@enderror @if ($hint)

{{ $hint }}

@endif
@endif