package pages

import (
	"net/http"

	"keikos.work/templates/layouts"

	// "forge.capytal.company/capytalcode/project-comicverse/lib/router/rerrors"
	"github.com/minio/minio-go/v7"
)

type Images struct {
	S3 *minio.Client
}

func (p *Images) List(w http.ResponseWriter, r *http.Request) {

}

func (p *Images) Get(w http.ResponseWriter, r *http.Request) {

}

func (p *Images) Create(w http.ResponseWriter, r *http.Request) {

}

func (p *Images) Update(w http.ResponseWriter, r *http.Request) {

}

func (p *Images) Delete(w http.ResponseWriter, r *http.Request) {

}

templ (p *Images) heading() {
	<script type="module" src="/assets/js/Images_form.js"></script>
}

templ (p *Images) Component() {
	@layouts.Page(layouts.PageInfo{
		Heading: p.heading(),
	}) {
		<img id="file-preview" src="" class="bg-gray min-h-20rem min-w-20rem max-w-full"/>
		<form action="/Images" method="post" enctype="multipart/form-data">
			<label for="file">File to upload</label>
			<input type="file" id="file" name="file"/>
			<button type="submit">Upload</button>
		</form>
	}
}
