"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const vitest_1 = require("vitest");
const react_1 = __importDefault(require("react"));
const react_2 = require("@testing-library/react");
const Textarea_1 = require("../Textarea");
describe('Textarea component', () => {
    it('supports inline type', () => {
        (0, react_2.render)(react_1.default.createElement(Textarea_1.Textarea, { placeholder: "test", type: "inline", name: "inline test", label: "in-label", setValue: vitest_1.vi.fn() }));
        const textbox = react_2.screen.getByRole('textbox');
        expect(textbox).toBeInTheDocument();
        expect(textbox.closest('div')).toHaveClass('inline');
        expect(react_2.screen.getByText('in-label')).toBeInTheDocument();
    });
    it('supports float type', () => {
        (0, react_2.render)(react_1.default.createElement(Textarea_1.Textarea, { placeholder: "test", type: "float", name: "float test", label: "float-label", setValue: vitest_1.vi.fn() }));
        const textbox = react_2.screen.getByRole('textbox');
        expect(textbox).toBeInTheDocument();
        expect(textbox.closest('div')).toHaveClass('float-form-style');
        expect(react_2.screen.getByText('float-label')).toBeInTheDocument();
    });
    it('supports default type', () => {
        (0, react_2.render)(react_1.default.createElement(Textarea_1.Textarea, { name: "default test", label: "default-label", placeholder: "", setValue: () => { } }));
        const textbox = react_2.screen.getByRole('textbox');
        expect(textbox).toBeInTheDocument();
        expect(textbox.closest('div')).toHaveClass('form-control');
        expect(textbox.closest('div')).not.toHaveClass('inline');
        expect(textbox.closest('div')).not.toHaveClass('float-form-style');
        expect(react_2.screen.getByText('default-label')).toBeInTheDocument();
    });
});
