<script lang="ts">
  import { cn, type WithElementRef } from '$lib/utils/cn.svelte.js';
  import type { HTMLAttributes } from 'svelte/elements';

  let {
    ref = $bindable(null),
    class: className,
    ...restProps
  }: WithElementRef<HTMLAttributes<HTMLInputElement>> = $props();
</script>

<input
  bind:this={ref}
  data-slot="sidebar-input"
  data-sidebar="input"
  class={cn(
    'bg-background border-input ring-offset-background placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 flex h-8 w-full min-w-0 rounded-md border px-2 py-1 text-sm shadow-xs outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50',
    className
  )}
  {...restProps}
/>