import { Card } from "@wrnexus/ui"

component UploadDropzone {
  props {
    store: string = "default"
    endpoint: string = "/api/upload"
    accept: string = ""
    maxBytes: number = 0
    multiple: boolean = false
    field: string = "file"
    invalidate: string = "uploads"
    label: string = "Drag files here or click to browse"
    title: string = "Upload files"
    description: string = "Files are validated and uploaded securely."
    color: string = "primary"
    size: string = "md"
    class: string = ""
  }
  view {
    <Card {...attrs} title='{title}' description='{description}' color='{color}' size='{size}' class='{class}'>
      <div data-uploader='{store}' data-endpoint='{endpoint}' data-accept='{accept}' data-max='{maxBytes}' data-multiple='{multiple}' data-field='{field}' data-label='{label}' data-invalidate='{invalidate}'></div>
    </Card>
  }
}
