import { jsx as _jsx } from "react/jsx-runtime";
import { Icon } from "@powerhousedao/design-system";
import { getDriveSharingType } from "@powerhousedao/reactor-browser";
export function DriveIcon({ drive, }) {
    const sharingType = getDriveSharingType(drive);
    const driveIconSrc = drive?.state.global.icon;
    if (driveIconSrc) {
        return (_jsx("img", { src: driveIconSrc, alt: drive.header.name, height: 32, width: 32 }));
    }
    if (sharingType === "LOCAL") {
        return _jsx(Icon, { name: "Hdd", size: 32 });
    }
    return _jsx(Icon, { name: "Server", size: 32 });
}
//# sourceMappingURL=drive-icon.js.map