protected function defineForm(FormObjectDefinition $form)
    {
        $form->section('Account Details', [
            $form->bind($this->serviceAccountEmail)->to(
                Field::create('service_account_email', 'Service Account Email')
                    ->string()->email()->required()
            ),
            //
            $form->bind($this->privateKeyData)->to(
                Field::create('private_key_data', 'Private Key (*.p12)')
                    ->file()->required()
                    ->extension('p12')
                    ->map(function (IUploadedFile $file) {
                        return base64_encode(file_get_contents($file->getFullPath()));
                    }, function (string $data) {
                        return new InMemoryFile(base64_decode($data), 'key.p12');
                    }, Type::string())
            ),
            //
            $form->bind($this->viewId)->to(
                Field::create('view_id', 'View ID')
                    ->int()->required()
            ),
        ]);

        $form->section('Dashboard', [
            $form->bind($this->locationChartMode)->to(
                Field::create('location_chart_mode', 'Analytics Map Mode')
                    ->enum(GoogleChartMode::class, [
                        GoogleChartMode::CITY    => 'Cities',
                        GoogleChartMode::COUNTRY => 'Countries',
                    ])
            ),
            //
            $form->bind($this->mapCountry)->to(
                Field::create('map_country', 'Analytics Map Country')
                    ->enum(Country::class, Country::getNameMap())
            ),
        ]);

        $form->section('Embed', [
            //
            $form->bind($this->trackingCode)->to(
                Field::create('tracking_code', 'UA tracking code')
                    ->string()->required()
            ),
        ]);
    }