array(), 'form' => array() ); $prefill = isset( $prefill ) && is_array( $prefill ) ? $prefill : array(); ?> '2:1' ) ); } list( $aieo_ab_open, $aieo_ab_close ) = AIEO_DMM_UI::card( array( 'anchor' => 'audience-builder-overview', 'icon' => 'sparkles', 'title' => __( 'New audience from a description', 'ai-eshop-optimizer' ), 'description' => __( 'Describe an audience in plain English — the engine turns it into a rule over your CDP and behavioural signals, shows how many customers match, and saves it for targeting. No SQL, no cohort dropdowns.', 'ai-eshop-optimizer' ), 'class' => 'aieo-ab', ) ); echo $aieo_ab_open; ?> 0 ) ) ), ENT_QUOTES | ENT_HTML5, 'UTF-8' ) : number_format_i18n( 100 ) ); $aieo_ab_nl = AIEO_Kit::row( __( 'Describe your audience', 'ai-eshop-optimizer' ), \Rooster\Admin\Ui::textarea( '', '', array( 'id' => 'aieo-ab-nl', 'rows' => 2, 'placeholder' => $aieo_ab_example ) ), '', array( 'id' => 'aieo-ab-nl' ) ); ?>

'audience-builder-saved-audiences', 'icon' => 'folders', 'title' => __( 'Saved audiences', 'ai-eshop-optimizer' ), 'description' => __('The audiences you have saved from this page, to open again or delete.', 'ai-eshop-optimizer'), ) ); echo $aieo_ab_open; ?>
'audience-builder-from-entries', 'icon' => 'users', 'title' => __( 'From a competition or a form', 'ai-eshop-optimizer' ), 'description' => __( 'The people who entered one of your competitions or filled in one of your forms, counted at once. No AI credits are used.', 'ai-eshop-optimizer' ), ) ); echo $aieo_ab_open; $aieo_ab_rows = \Rooster\Admin\Ui::field_row( array( 'id' => 'aieo-ab-entry-kind', 'label' => __( 'Made from', 'ai-eshop-optimizer' ), 'control' => \Rooster\Admin\Ui::select( '', array( 'competition' => __( 'A competition', 'ai-eshop-optimizer' ), 'form' => __( 'A form', 'ai-eshop-optimizer' ) ), $aieo_ab_kind, array( 'id' => 'aieo-ab-entry-kind' ) ), ) ); foreach ( array( 'competition' => array( __( 'Competition', 'ai-eshop-optimizer' ), __( 'Choose a competition', 'ai-eshop-optimizer' ), __( 'Only confirmed entries count.', 'ai-eshop-optimizer' ) ), 'form' => array( __( 'Form', 'ai-eshop-optimizer' ), __( 'Choose a form', 'ai-eshop-optimizer' ), '' ), ) as $aieo_ab_of => $aieo_ab_words ) { $aieo_ab_rows .= \Rooster\Admin\Ui::field_row( array( 'id' => 'aieo-ab-entry-' . $aieo_ab_of, 'label' => $aieo_ab_words[0], 'help' => $aieo_ab_words[2], 'control' => \Rooster\Admin\Ui::select( '', array( '' => $aieo_ab_words[1] ) + (array) ( $entries[ $aieo_ab_of ] ?? array() ), $aieo_ab_of === $aieo_ab_kind ? $aieo_ab_pick : '', array( 'id' => 'aieo-ab-entry-' . $aieo_ab_of ) ), 'attrs' => \Rooster\Admin\States::depends_attrs( 'aieo-ab-entry-kind', $aieo_ab_of === $aieo_ab_kind, array( 'value' => $aieo_ab_of ) ), ) ); } $aieo_ab_rows .= \Rooster\Admin\Ui::field_row( array( 'id' => 'aieo-ab-entry-days', 'label' => __( 'In the last', 'ai-eshop-optimizer' ), 'help' => __( 'Leave it empty to count every entry, whenever it was made.', 'ai-eshop-optimizer' ), 'control' => \Rooster\Admin\Ui::input( '', '', array( 'id' => 'aieo-ab-entry-days', 'type' => 'number', 'xs' => true, 'min' => '1', 'max' => '3650', 'step' => '1', 'unit' => __( 'days', 'ai-eshop-optimizer' ) ) ), ) ); ?>
'primary', 'attrs' => array( 'id' => 'aieo-ab-entry-count' ) ) ); ?>