import { jsxs as l, Fragment as b, jsx as e } from "react/jsx-runtime";
import { useState as c } from "react";
import { H as x, C as a, a as i, T as t, v as s, P as u, A as w, c as N } from "../index-sdOMz8GW.js";
import { AlignLeft as v } from "lucide-react";
import "react-router-dom";
import "react-dom";
const P = () => {
  const [n, d] = c(""), [m, h] = c(""), p = [
    { label: "Primary", color: "primary" },
    { label: "Secondary", color: "secondary" },
    { label: "Danger", color: "danger" },
    { label: "Info", color: "info" },
    { label: "Success", color: "success" },
    { label: "Warning", color: "warning" }
  ], g = [
    { label: "Small", size: "sm" },
    { label: "Medium", size: "md" },
    { label: "Large", size: "lg" }
  ];
  return /* @__PURE__ */ l(b, { children: [
    /* @__PURE__ */ e(
      x,
      {
        title: "Textarea",
        description: "A multi-line text input component for longer text content.",
        icon: /* @__PURE__ */ e("div", { className: "w-20 h-20 sm:w-24 sm:h-24 md:w-32 md:h-32 bg-linear-to-br from-rose-500 via-pink-500 to-fuchsia-500 rounded-full flex items-center justify-center shadow-lg border border-rose-500/50", children: /* @__PURE__ */ e(v, { className: "w-10 h-10 sm:w-12 sm:h-12 md:w-16 md:h-16 text-white filter drop-shadow-lg" }) })
      }
    ),
    /* @__PURE__ */ e(a, { className: "overflow-hidden", children: /* @__PURE__ */ e(i, { title: "Examples", className: "mt-2 mb-2", children: /* @__PURE__ */ e("div", { className: "w-full p-4 sm:p-6", children: /* @__PURE__ */ l("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
      /* @__PURE__ */ l(a, { className: "p-4", children: [
        /* @__PURE__ */ e(t, { tag: "h5", className: "mb-3", children: "Basic Textarea" }),
        /* @__PURE__ */ e(
          s,
          {
            label: "Message",
            placeholder: "Write your message here",
            value: n,
            onChange: (r) => d(r.target.value),
            rows: 4
          }
        )
      ] }),
      /* @__PURE__ */ l(a, { className: "p-4", children: [
        /* @__PURE__ */ e(t, { tag: "h5", className: "mb-3", children: "With Helper Text" }),
        /* @__PURE__ */ e(
          s,
          {
            label: "Description",
            placeholder: "Enter description",
            helperText: "Provide a detailed description",
            rows: 4
          }
        )
      ] }),
      /* @__PURE__ */ l(a, { className: "p-4", children: [
        /* @__PURE__ */ e(t, { tag: "h5", className: "mb-3", children: "With Error" }),
        /* @__PURE__ */ e(
          s,
          {
            label: "Comments",
            placeholder: "Enter comments",
            error: "Comments are required",
            rows: 4
          }
        )
      ] }),
      /* @__PURE__ */ l(a, { className: "p-4", children: [
        /* @__PURE__ */ e(t, { tag: "h5", className: "mb-3", children: "Disabled" }),
        /* @__PURE__ */ e(
          s,
          {
            label: "Notes",
            placeholder: "Disabled textarea",
            disabled: !0,
            rows: 4
          }
        )
      ] })
    ] }) }) }) }),
    /* @__PURE__ */ e(a, { className: "overflow-hidden", children: /* @__PURE__ */ e(i, { title: "Variants", className: "mt-2 mb-2", children: /* @__PURE__ */ e("div", { className: "w-full p-4 sm:p-6", children: /* @__PURE__ */ l("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-4", children: [
      /* @__PURE__ */ l(a, { className: "p-4", children: [
        /* @__PURE__ */ e(t, { tag: "h5", className: "mb-3", children: "Ghost (default)" }),
        /* @__PURE__ */ e(
          s,
          {
            label: "Ghost Variant",
            placeholder: "Enter text",
            variant: "ghost",
            rows: 3
          }
        )
      ] }),
      /* @__PURE__ */ l(a, { className: "p-4", children: [
        /* @__PURE__ */ e(t, { tag: "h5", className: "mb-3", children: "Solid" }),
        /* @__PURE__ */ e(
          s,
          {
            label: "Solid Variant",
            placeholder: "Enter text",
            variant: "solid",
            rows: 3
          }
        )
      ] }),
      /* @__PURE__ */ l(a, { className: "p-4", children: [
        /* @__PURE__ */ e(t, { tag: "h5", className: "mb-3", children: "Transparent" }),
        /* @__PURE__ */ e(
          s,
          {
            label: "Transparent Variant",
            placeholder: "Enter text",
            variant: "transparent",
            rows: 3
          }
        )
      ] })
    ] }) }) }) }),
    /* @__PURE__ */ e(a, { className: "overflow-hidden", children: /* @__PURE__ */ e(i, { title: "Colors", className: "mt-2 mb-2", children: /* @__PURE__ */ e("div", { className: "w-full p-4 sm:p-6", children: /* @__PURE__ */ e("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-3", children: p.map(({ label: r, color: o }) => /* @__PURE__ */ l(a, { className: "p-4", children: [
      /* @__PURE__ */ e(t, { tag: "h5", className: "mb-3", children: r }),
      /* @__PURE__ */ e(
        s,
        {
          label: `${r} Textarea`,
          placeholder: "Enter text",
          rows: 3,
          color: o
        }
      )
    ] }, o)) }) }) }) }),
    /* @__PURE__ */ e(a, { className: "overflow-hidden", children: /* @__PURE__ */ e(i, { title: "Sizes", className: "mt-2 mb-2", children: /* @__PURE__ */ e("div", { className: "w-full p-4 sm:p-6", children: /* @__PURE__ */ e("div", { className: "grid grid-cols-1 gap-4 md:grid-cols-3", children: g.map(({ label: r, size: o }) => /* @__PURE__ */ l(a, { className: "p-4", children: [
      /* @__PURE__ */ e(t, { tag: "h5", className: "mb-3", children: r }),
      /* @__PURE__ */ e(
        s,
        {
          label: `${r} Textarea`,
          placeholder: "Enter text",
          rows: 3,
          size: o
        }
      )
    ] }, o)) }) }) }) }),
    /* @__PURE__ */ e(
      u,
      {
        componentName: "Textarea",
        defaultValues: {
          label: "Preview Textarea",
          placeholder: "Enter text",
          variant: "ghost",
          color: "primary",
          size: "md",
          rows: 4,
          helperText: "",
          error: "",
          useUppercaseLabel: !1,
          disabled: !1
        },
        controlOverrides: [
          {
            name: "placeholder",
            type: "text",
            description: "Placeholder text rendered inside the textarea"
          },
          {
            name: "color",
            type: "select",
            options: [
              "primary",
              "secondary",
              "danger",
              "info",
              "success",
              "warning"
            ],
            description: "Color treatment applied to the control"
          },
          {
            name: "rows",
            type: "number",
            description: "Visible row count for the textarea preview"
          },
          {
            name: "disabled",
            type: "boolean",
            description: "Disables the textarea and prevents interaction"
          }
        ],
        includeProps: [
          "label",
          "placeholder",
          "variant",
          "color",
          "size",
          "rows",
          "helperText",
          "error",
          "useUppercaseLabel",
          "disabled"
        ],
        excludeProps: ["inputClassName"],
        children: (r) => /* @__PURE__ */ e("div", { className: "w-full max-w-lg", children: /* @__PURE__ */ e(
          s,
          {
            ...r,
            rows: typeof r.rows == "number" ? r.rows : 4,
            placeholder: r.placeholder || "Enter text",
            value: m,
            onChange: (o) => h(o.target.value)
          }
        ) })
      }
    ),
    /* @__PURE__ */ e(w, { componentName: "Textarea" }),
    /* @__PURE__ */ e(a, { className: "overflow-hidden", children: /* @__PURE__ */ e(i, { title: "Code Example", className: "mt-2 mb-2", children: /* @__PURE__ */ e("div", { className: "w-full p-4 sm:p-6", children: /* @__PURE__ */ e(
      N,
      {
        language: "tsx",
        code: `import { Textarea } from '@e-burgos/tucu-ui';

<Textarea
  label="Message"
  placeholder="Write your message here"
  value={value}
  onChange={(e) => setValue(e.target.value)}
  rows={4}
/>

<Textarea
  label="Description"
  placeholder="Enter description"
  helperText="Provide a detailed description"
  rows={4}
/>

// Variants
<Textarea label="Ghost" variant="ghost" rows={4} />
<Textarea label="Solid" variant="solid" rows={4} />
<Textarea label="Transparent" variant="transparent" rows={4} />

// Colors
<Textarea label="Primary" color="primary" rows={4} />
<Textarea label="Secondary" color="secondary" rows={4} />
<Textarea label="Danger" color="danger" rows={4} />
<Textarea label="Info" color="info" rows={4} />
<Textarea label="Success" color="success" rows={4} />
<Textarea label="Warning" color="warning" rows={4} />

// Sizes
<Textarea label="Small" size="sm" rows={3} />
<Textarea label="Medium" size="md" rows={4} />
<Textarea label="Large" size="lg" rows={5} />`
      }
    ) }) }) })
  ] });
};
export {
  P as default
};
