- !<AssetImportMetadata/a287ac50-4ae1-4554-92cd-e116a2153465>
  ImportedAssetIds:
    TypeScriptAsset: !<reference> f35db787-be82-4edc-9413-dc356f19ad1f
  ImporterName: TypeScriptAssetImporter
  PrimaryAsset: !<reference> f35db787-be82-4edc-9413-dc356f19ad1f
  PackageType: NotAPackage
  PackagePolicy: CannotBeUnpacked
  AssetDataMap:
    TypeScriptAsset: !<own> 3f2b309a-95e8-43cc-9dd3-7f5d9b5e4b8e
  DependentFiles:
    []
  ImporterSettings: !<AssetImporterSettings/338a1bad-6172-4bb2-97d9-d4d7627c2159>
    {}
  CompressionSettings: !<own> 00000000-0000-0000-0000-000000000000
- !<TypeScriptAssetData/3f2b309a-95e8-43cc-9dd3-7f5d9b5e4b8e>
  SvgIcon: |
    <svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
    <path fill-rule="evenodd" clip-rule="evenodd" d="M5.05259 10.6202L9.98973 10.0091L10.2846 12.3909L6.5004 12.8593C6.66657 13.7384 7.04363 14.6453 7.66589 15.3943C8.51016 16.4106 9.86449 17.2111 11.9886 17.2111V19.6111C9.17551 19.6111 7.13555 18.5117 5.81983 16.928C4.53561 15.3821 4 13.449 4 11.8111C4 11.2054 4.45144 10.6946 5.05259 10.6202Z" fill="#D0DAE6"/>
    <path fill-rule="evenodd" clip-rule="evenodd" d="M26.9474 10.6202L22.0103 10.0091L21.7154 12.3909L25.4996 12.8593C25.3334 13.7384 24.9564 14.6453 24.3341 15.3943C23.4898 16.4106 22.1355 17.2111 20.0114 17.2111V19.6111C22.8245 19.6111 24.8645 18.5117 26.1802 16.928C27.4644 15.3821 28 13.449 28 11.8111C28 11.2054 27.5486 10.6946 26.9474 10.6202Z" fill="#D0DAE6"/>
    <path fill-rule="evenodd" clip-rule="evenodd" d="M17.2 22.6613C17.2 22.1632 17.5297 21.7332 17.9718 21.5038C20.9897 19.9376 23.2 15.0527 23.2 11.2111C23.2 6.97004 22.6986 6.97315 17.5699 7.00492C17.0885 7.0079 16.5664 7.01113 16 7.01113C11.8064 7.01113 10.0553 6.86214 9.32416 7.6544C8.8 8.22235 8.8 9.27404 8.8 11.2111C8.8 15.0527 11.0103 19.9376 14.0282 21.5038C14.4703 21.7332 14.8 22.1632 14.8 22.6613C14.8 23.2902 14.2902 23.8 13.6613 23.8H12.0649C11.5484 23.8 11.0898 24.1305 10.9265 24.6205L10.5265 25.8205C10.2675 26.5975 10.8458 27.4 11.6649 27.4H20.3351C21.1542 27.4 21.7325 26.5975 21.4735 25.8205L21.0735 24.6205C20.9102 24.1305 20.4516 23.8 19.9351 23.8H18.3387C17.7098 23.8 17.2 23.2902 17.2 22.6613Z" fill="#D0DAE6"/>
    </svg>

  Description: |-
    Leaderboard
    Description:
    A real-time ranking component that displays user scores, helping users track their progress and compare with friends and users worldwide.
    
    If friends haven’t played a game, the leaderboard is going to show a fallback placeholder. If the list of friends is big - the leaderboard becomes scrollable. Global leaderboard will show bitmoji stickers and scores among all snapchatters who submitted scores in this leaderboard. Friends leaderboard will only show friends.
    
    Changing of Leaderboard name results in Leaderboard reset.
    Developers don’t have access to  Snapchatters' scores/ranks.
    
    API:
    visible: boolean - show if leaderboard is visible
    show(): void - shows table with scores
    hide(): void - hides table with scores
    submitScore(score: number): void - submits score to leaderboard
    getSideSwitcher(): SideSwitcher - returns SideSwitcher custom component
    initializeWithOptions(leaderboardInitializationOptions: LeaderboardInitializationOptions): void - initializes leaderboard from code
    
    type LeaderboardInitializationOptions = \{
        name: string
        userType: UsersType
        scoreOrdering: OrderingType
        scoreResetInterval: ScoreResetIntervalOption
        userLimit: number,
        useTimer: boolean,
        leaderboardStartDate?: string //format "mm/dd/yyyy"
    \}
    
    enum ScoreResetIntervalOption \{
        Day = 0,
        Week = 1,
        Month = 2,
        Year = 3
    \}
    
    async getLeaderboard(): Promise<Leaderboard> - returns Leaderboard object
    async getCurrentUser(): Promise<SnapchatUser> - returns SnapchatUser object of current user
    async getCurrentUserBitmoji(): Promise<Texture> - returns texture with current user bitmoji sticker
    API Events:
    onLeaderboardRecordsUpdated: Event<LeaderboardRecordsWrapper> - returns UserRecords and UserRecord for current user.
    onShow: Event - is triggered when full leaderboard opened 
    onHide: Event - is triggered when full leaderboard closed 
    
    API Events Usage:
    //@input Component.ScriptComponent Leaderboard
    script.Leaderboard.onLeaderboardRecordsUpdated.add((leaderboardRecordsWrapper) => \{
        print(leaderboardRecordsWrapper.userRecords)
        print(leaderboardRecordsWrapper.currentUserRecord)
    \});
  InternalVersion: 4
  VersionMajor: 1
  VersionMinor: 1
  VersionPatch: 0
  ComponentUid: 32747b76-d3f1-4a92-80d0-fcd5c5cd377b
  ExportUid: a2a3a7fe-07a8-465b-8ba2-0832d6bca80b
  CurrentVisibility: Locked
  MaxVisibility: Editable
  ScriptInputsHidden:
    autoInitialize: false
    backgroundCustomization: false
    backgroundTexture: false
    bitmojiModule: true
    cameraBadgePrefab: false
    componentDependencies: true
    customStickerId: false
    editDebugSettings: false
    leaderboardEntry: false
    leaderboardEntryFallback: true
    leaderboardModule: false
    leaderboardName: false
    leaderboardStartDate: false
    leaderboardVisuals: true
    printDebugStatements: false
    printWarningStatements: false
    remoteMediaModule: true
    renderOrder: false
    scoreLifetimeOption: false
    scoreOrdering: false
    useCameraBadge: false
    userLimit: false
  ScriptTypesHidden:
    {}
  DefaultScriptInputs:
    - editDebugSettings: false
      printDebugStatements: true
      printWarningStatements: true
      leaderboardName: name
      scoreLifetimeOption: 1
      scoreOrdering: 1
      userLimit: 10
      renderOrder: 1
      customStickerId: ""
      leaderboardEntry: !<reference.ObjectPrefab> 6da8b57c-8ded-46fb-a9bc-d9cfde3aa174
      cameraBadgePrefab: !<reference.ObjectPrefab> f5c84a1d-4b23-4d28-afd4-31e726f7a24b
      leaderboardVisuals: !<reference.ObjectPrefab> 235f6184-25cd-4616-91d3-ce97fb2d85e7
      leaderboardEntryFallback: !<reference.ObjectPrefab> d24979e2-6a48-45ff-964a-bf4f0f95ba31
      componentDependencies: !<reference.ObjectPrefab> 290d1fe6-2e1d-4dc5-8131-790fde695daf
      leaderboardModule: !<reference.LeaderboardModule> b64949b3-b8e6-4e2f-9ebb-ef25f6f223d5
      useCameraBadge: false
      bitmojiModule: !<reference.BitmojiModule> bc24cc0c-473c-4cf3-b875-6a9b6963eee3
      remoteMediaModule: !<reference.RemoteMediaModule> 2f268c65-d2ff-44aa-be05-b291a8a4269d
      backgroundCustomization: 2
      backgroundTexture: !<reference.Texture> 6ea8570a-4c32-4e24-a84e-7b12b8ebc06a
      autoInitialize: true
      leaderboardStartDate: 12/31/2024
  ScriptTypes:
    -
      {}
  InputLines:
    - // @input bool editDebugSettings
    - '// @ui {"widget":"group_start", "label":"Debug Statements", "showIf":"editDebugSettings"}'
    - '// @input bool printDebugStatements = "true" {"label":"Print Info"}'
    - '// @input bool printWarningStatements = "true" {"label":"Print Warnings"}'
    - '// @ui {"widget":"group_end"}'
    - '// @ui {"widget":"separator"}'
    - '// @input string leaderboardName = "" {"hint":"Changing leaderboard name will reset scores"}'
    - '// @input boolean autoInitialize = "true"'
    - '// @input int scoreLifetimeOption = "1" {"label":"Score Reset Interval", "widget":"combobox", "values":[{"label":"Day", "value":0}, {"label":"Week", "value":1}, {"label":"Month", "value":2}, {"label":"Year", "value":3}]}'
    - '// @input string leaderboardStartDate = "12/31/2024" {"hint":"In format mm/dd/yyyy"}'
    - '// @input int scoreOrdering = "1" {"widget":"combobox", "values":[{"label":"Descending", "value":1}, {"label":"Ascending", "value":2}]}'
    - '// @input int userLimit = "10" {"hint":"Maximum user limit is 50"}'
    - '// @ui {"widget":"separator"}'
    - '// @input int renderOrder = "1"'
    - '// @input int backgroundCustomization = "2" {"widget":"combobox", "values":[{"label":"None", "value":0}, {"label":"Bitmoji", "value":1}, {"label":"Texture", "value":2}]}'
    - '// @input Asset.Texture backgroundTexture {"showIf":"backgroundCustomization", "showIfValue":2}'
    - '// @input string customStickerId {"hint":"Please enter bitmoji sticker id or leave empty to use selfie sticker", "showIf":"backgroundCustomization", "showIfValue":1}'
    - '// @ui {"widget":"group_start", "label":"Customisable Prefabs", "showIf":"customisablePrefabs"}'
    - '// @input Asset.ObjectPrefab leaderboardEntry {"hint":"This Prefab contains LeaderboardEntry script which can be customised"}'
    - // @input Asset.ObjectPrefab cameraBadgePrefab
    - '// @ui {"widget":"group_end"}'
    - '// @ui {"widget":"separator"}'
    - // @input Asset.ObjectPrefab leaderboardVisuals
    - // @input Asset.ObjectPrefab leaderboardEntryFallback
    - // @input Asset.ObjectPrefab componentDependencies
    - // @input bool useCameraBadge = false
    - // @input Asset.LeaderboardModule leaderboardModule
    - // @input Asset.BitmojiModule bitmojiModule
    - // @input Asset.RemoteMediaModule remoteMediaModule
