---
import type { Input as Props } from 'types';

const { type, name, label, autocomplete, placeholder, divClass, inputClass} = Astro.props;

---

<>
  {
    name && (
      <div class={divClass}>
        {label && (
          <label for={name} class="block text-sm font-medium">
            {label}
          </label>
        )}
        <input
          type={type}
          name={name}
          id={name}
          autocomplete={autocomplete}
          placeholder={placeholder}
          class={"py-3 px-4 block w-full text-md rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-slate-900" + inputClass}
        />
      </div>
    )
  }
</>
