import { Field, Input, Label, Select } from '@headlessui/react'

import { SearchIcon } from '~/components/icons/search'
import DefaultTextEditor from '~/components/ui/text-editor'
import { TitleDashboard } from '~/components/ui/title-dashboard'

export const CreateContentsPage = () => {
  return (
    <div className="relative">
      <TitleDashboard title="Konten" />
      <div className="mb-8 flex items-center gap-5 rounded-lg bg-gray-50 text-[#363636]">
        <div className="w-[400px]">
          <Field>
            <Label className="mb-2 block text-sm font-medium">Pilih Tags</Label>
            <div className="relative">
              <Input
                type="text"
                placeholder="Cari Tags"
                className="w-full rounded-lg bg-white p-2 pr-10 pl-4 shadow focus:ring-1 focus:ring-[#2E2F7C] focus:outline-none"
              />
              <div className="absolute inset-y-0 right-0 flex items-center pr-3">
                <SearchIcon className="h-5 w-5" />
              </div>
            </div>
          </Field>
        </div>

        <div className="w-[235px]">
          <Field>
            <Label className="mb-2 block text-sm font-medium">Status</Label>
            <Select className="w-full rounded-lg bg-white p-2 shadow focus:ring-1 focus:ring-[#2E2F7C] focus:outline-none">
              <option>Pilih Status</option>
              <option>Aktif</option>
              <option>Nonaktif</option>
            </Select>
          </Field>
        </div>
      </div>

      <section>
        <DefaultTextEditor />
      </section>
    </div>
  )
}
