isMedia() && $this !== self::Html; } /** * Return the template under resources/templates/fields/controls that renders the control. * * @return string */ public function template(): string { return match ($this) { self::Textarea => 'textarea', self::Select => 'select', self::Switch => 'switch', self::Multiselect => 'multiselect', self::File, self::Image => 'media', self::Complex => 'complex', self::Html => 'html', default => 'input', }; } /** * Return the of single-line controls. * * @return string */ public function inputType(): string { return match ($this) { self::Number, self::Url, self::Email, self::Time => $this->value, default => 'text', }; } }