name.'Input'; } /** * The input fields. * * @return InputField[] */ abstract public function fields(): array; /** * Get the input as a string representation. */ public function __toString(): string { if (blank($this->fields())) { return ''; } return sprintf( 'input %s { %s }', $this->getName(), implode(PHP_EOL, Arr::map($this->fields(), fn (InputField $field) => $field->__toString())) ); } }