"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const react_1 = tslib_1.__importDefault(require("react"));
const types_1 = require("../../types");
const Toggle_1 = tslib_1.__importDefault(require("../../PHXToggle/Toggle"));
function List({ filteredItems }) {
    return (react_1.default.createElement(react_1.default.Fragment, null, filteredItems === null || filteredItems === void 0 ? void 0 : filteredItems.map((item, index) => (react_1.default.createElement("div", { key: index, "aria-hidden": true, className: (0, types_1.classNames)(index < filteredItems.length - 1 && 'border-b') },
        react_1.default.createElement("label", { className: 'hover:cursor-pointer' },
            react_1.default.createElement("div", { className: 'flex gap-x-1.5 items-center p-3' },
                react_1.default.createElement("div", { className: 'flex-1 flex gap-x-1.5 items-center' },
                    (item === null || item === void 0 ? void 0 : item.avatar) && (react_1.default.createElement("img", { alt: 'avatar', className: `h-10 w-10 rounded-full mr-2 ${item === null || item === void 0 ? void 0 : item.avatarClassname}`, src: item.avatar })),
                    react_1.default.createElement("div", { className: 'flex flex-col gap-y-0.5' },
                        (item === null || item === void 0 ? void 0 : item.name) && react_1.default.createElement("p", { className: 'text-xs font-medium text-gray-900' }, item.name),
                        (item === null || item === void 0 ? void 0 : item.location) && react_1.default.createElement("p", { className: `text-xs  font-normal text-gray-600` }, item.location))),
                react_1.default.createElement(Toggle_1.default, { active: item.toggle.active, onChange: (active) => item.toggle.onChange(active) }))),
        react_1.default.createElement("div", { className: `space-y-3` }, item.subContent))))));
}
exports.default = List;
//# sourceMappingURL=list.js.map