public function datalist(string $id, array $list = []): Htmlable
    {
        $this->type = 'datalist';

        $attributes['id'] = $id;

        $html = [];

        if (Arr::isAssoc($list)) {
            foreach ($list as $value => $display) {
                $html[] = $this->option($display, $value, null, []);
            }
        } else {
            foreach ($list as $value) {
                $html[] = $this->option($value, $value, null, []);
            }
        }

        $attributes = $this->getHtmlBuilder()->attributes($attributes);

        $list = \implode('', $html);

        return $this->toHtmlString("<datalist{$attributes}>{$list}</datalist>");
    }