import React, { useEffect } from "react"; import styled from "styled-components"; import { Field } from "redux-form"; import { DropdownWrapper, FormBodyWrapper, withDropdown } from "./common"; import { createMessage, WELCOME_FORM_EMAIL_ID, WELCOME_FORM_FIRST_NAME, WELCOME_FORM_LAST_NAME, WELCOME_FORM_CREATE_PASSWORD, WELCOME_FORM_VERIFY_PASSWORD, WELCOME_FORM_CUSTOM_USE_CASE, WELCOME_FORM_USE_CASE_PLACEHOLDER, CONTINUE, ONBOARDING_STATUS_GET_STARTED, WELCOME_FORM_NON_SUPER_USER_PROFICIENCY_LEVEL, WELCOME_FORM_NON_SUPER_USER_USE_CASE, } from "@appsmith/constants/messages"; import FormTextField from "components/utils/ReduxFormTextField"; import type { SetupFormProps } from "./SetupForm"; import { ButtonWrapper } from "pages/Applications/ForkModalStyles"; import { FormGroup } from "design-system-old"; import { Button, Checkbox } from "design-system"; import { proficiencyOptions, useCaseOptions } from "./constants"; import { isAirgapped } from "@appsmith/utils/airgapHelpers"; import { setFirstTimeUserOnboardingTelemetryCalloutVisibility } from "utils/storage"; import RadioButtonGroup from "components/editorComponents/RadioButtonGroup"; import { Space } from "./GetStarted"; const DetailsFormWrapper = styled.div` width: 100%; position: relative; `; const StyledFormBodyWrapper = styled(FormBodyWrapper)``; const StyledTabIndicatorWrapper = styled.div` display: flex; `; const StyledTabIndicator = styled.div<{ isFirstPage?: boolean }>` width: 48px; height: 3px; margin: 0 6px 0 0; background-color: ${(props) => props.isFirstPage ? `var(--ads-v2-color-bg-emphasis);` : `var(--ads-v2-color-bg-brand);`}; `; const StyledFormGroup = styled(FormGroup)` && > .bp3-label { color: var(--ads-v2-color-fg); } `; export default function DetailsForm( props: SetupFormProps & { isFirstPage: boolean } & { toggleFormPage: () => void; }, ) { const ref = React.createRef(); useEffect(() => { const setTelemetryVisibleFalse = async () => { await setFirstTimeUserOnboardingTelemetryCalloutVisibility(false); }; setTelemetryVisibleFalse(); }, []); return (
{!props.isFirstPage && (
{props.useCase == "other" && ( )} {!isAirgapped() && ( I want security and product updates. )}
)} {props.isFirstPage && ( )} {!props.isFirstPage && ( )}
); }