$label])` (guest-only, gated on * `StoreSettings::get('user_account_creation_mode') === 'user_choice'`); builder always * shows the checkbox regardless of login state or store setting (task instruction 3). * Singleton within one checkout, optional. */ final class FCCheckoutCreateAccount extends \Breakdance\Elements\Element { public static function uiIcon() { return ''; } public static function tag() { return 'div'; } public static function tagOptions() { return []; } public static function tagControlPath() { return false; } public static function name() { return 'FC Checkout: Create Account'; } public static function className() { return 'fcbd-fc-checkout-create-account-element'; } public static function category() { return 'fluentcart'; } public static function badge() { return ['label' => 'FC', 'backgroundColor' => '#3157d5', 'textColor' => '#fff']; } public static function slug() { return __CLASS__; } public static function template() { return file_get_contents(__DIR__ . '/html.twig'); } public static function defaultCss() { return file_get_contents(__DIR__ . '/default.css'); } /** * FIXTAAK TAAK 2 (heading audit, v0.6.0+1): CheckoutSectionRenderers::createAccount() * renders only a checkbox + label in both the live and builder paths, never a heading * tag (see FC_Checkout/element.php's own cssTemplate() comment for the full * checkout-wide grep evidence). ['text'] suppresses the otherwise-dead heading CSS. */ public static function cssTemplate() { return ControlPresets::typographyCssSnippet('%%SELECTOR%%', 'design.typography', ['text']) . ControlPresets::spacingCssSnippet() . CheckoutControlPresets::checkboxCssSnippet() . file_get_contents(__DIR__ . '/css.twig'); } public static function defaultChildren() { return false; } public static function dependencies() { return false; } public static function settingsControls() { return []; } public static function settings() { return ['proOnly' => false]; } public static function availableIn() { return ['breakdance']; } public static function propertyPathsToSsrElementWhenValueChanges() { return ['content.settings.label']; } public static function defaultProperties() { return ['content' => ['settings' => ['label' => '']]]; } public static function contentControls() { return [c('settings', __('Settings', 'sparkcore-commerce'), [ c('label', __('Label', 'sparkcore-commerce'), [], ['type' => 'text', 'layout' => 'vertical'], false, false, []), ], ['type' => 'section', 'layout' => 'vertical'], false, false, [])]; } /** FIXTAAK TAAK 2: no heading fields (['text']); see cssTemplate()'s own comment. */ public static function designControls() { return [ CheckoutControlPresets::checkboxSection(), ControlPresets::typographySection('typography', 'Typography', ['text']), ControlPresets::spacingSection(), ]; } public static function nestingRule() { return ['type' => 'final']; } }