import{_ as a,c as r,a0 as t,o as n}from"./chunks/framework.P9qPzDnn.js";const f=JSON.parse('{"title":"Interface: Challenge","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"api/features/challenges/challenge/interfaces/Challenge.md","filePath":"api/features/challenges/challenge/interfaces/Challenge.md","lastUpdated":null}'),o={name:"api/features/challenges/challenge/interfaces/Challenge.md"};function i(l,e,c,s,h,d){return n(),r("div",null,e[0]||(e[0]=[t('
Profectus / features/challenges/challenge / Challenge
An object that represents a feature that can be entered and exited, and have one or more completions with scaling requirements.
[VueFeature]:
true
Used to identify Vue Features
active:
Persistent
<boolean
>
Whether or not this challenge is currently active.
profectus/src/features/challenges/challenge.tsx:90
canComplete:
Ref
<DecimalSource
,DecimalSource
>
The current amount of times this challenge can be completed.
profectus/src/features/challenges/challenge.tsx:82
optional
canStart:MaybeRef
<boolean
>
Whether this challenge can be started.
profectus/src/features/challenges/challenge.tsx:76
Dictionary of CSS classes to apply to this feature.
complete: (
remainInChallenge
?) =>void
A function to complete this challenge.
boolean
Optional parameter to specify if the challenge should remain active after completion.
void
profectus/src/features/challenges/challenge.tsx:97
completed:
Ref
<boolean
,boolean
>
Whether or not this challenge has been completed.
profectus/src/features/challenges/challenge.tsx:86
optional
completionLimit:MaybeRef
<DecimalSource
>
The maximum number of times the challenge can be completed.
profectus/src/features/challenges/challenge.tsx:78
completions:
Persistent
<DecimalSource
>
The current number of times this challenge has been completed.
profectus/src/features/challenges/challenge.tsx:84
components:
MaybeGetter
<Renderable
>[]
The components to render inside the vue feature
optional
display:MaybeGetter
<Renderable
>
The display to use for this challenge.
profectus/src/features/challenges/challenge.tsx:80
id:
string
An auto-generated ID for identifying features that appear in the DOM. Will not persist between refreshes or updates.
maxed:
Ref
<boolean
,boolean
>
Whether or not this challenge's completion count is at its limit.
profectus/src/features/challenges/challenge.tsx:88
optional
onComplete:VoidFunction
A function that is called when the challenge is completed.
profectus/src/features/challenges/challenge.tsx:70
optional
onEnter:VoidFunction
A function that is called when the challenge is entered.
profectus/src/features/challenges/challenge.tsx:74
optional
onExit:VoidFunction
A function that is called when the challenge is exited.
profectus/src/features/challenges/challenge.tsx:72
requirements:
Requirements
The requirement(s) to complete this challenge.
profectus/src/features/challenges/challenge.tsx:68
optional
reset:Reset
The reset function for this challenge.
profectus/src/features/challenges/challenge.tsx:66
optional
style:MaybeRef
<CSSProperties
>
CSS to apply to this feature.
toggle:
VoidFunction
A function to enter or leave the challenge.
profectus/src/features/challenges/challenge.tsx:92
type: typeof
ChallengeType
A symbol that helps identify features of the same type.
profectus/src/features/challenges/challenge.tsx:99
optional
visibility:MaybeRef
<boolean | Visibility>
Whether this feature should be visible.
wrappers:
Wrapper
[]
The components to render wrapped around the vue feature