Forms\Components\TextInput::make('amount')
->numeric()
->reactive()
->afterStateUpdated(function (callable $set, callable $get, $state) {
$this->calculate($set, $get);
})
->required(),
Forms\Components\TextInput::make('price')
->extraInputAttributes(['readonly' => true]),
Forms\Components\TextInput::make('sum')
->extraInputAttributes(['readonly' => true]),
Forms\Components\TextInput::make('amount')
->numeric()
->reactive()
->afterStateUpdated(function (callable $set, callable $get, $state) {
$this->calculate($set, $get);
})
->required(),
Forms\Components\TextInput::make('price')
->extraInputAttributes(['readonly' => true]),
Forms\Components\TextInput::make('sum')
->extraInputAttributes(['readonly' => true]),