{"version":3,"file":"SlotData.mjs","sources":["../../src/core/SlotData.ts"],"sourcesContent":["import { Color } from '@pixi-spine/base';\n\nimport type { ISlotData } from '@pixi-spine/base';\nimport { BLEND_MODES } from '@pixi/core';\nimport type { BoneData } from './BoneData';\n\n/** Stores the setup pose for a {@link Slot}.\n * @public\n * */\nexport class SlotData implements ISlotData {\n    /** The index of the slot in {@link Skeleton#getSlots()}. */\n    index = 0;\n\n    /** The name of the slot, which is unique across all slots in the skeleton. */\n    name: string;\n\n    /** The bone this slot belongs to. */\n    boneData: BoneData;\n\n    /** The color used to tint the slot's attachment. If {@link #getDarkColor()} is set, this is used as the light color for two\n     * color tinting. */\n    color = new Color(1, 1, 1, 1);\n\n    /** The dark color used to tint the slot's attachment for two color tinting, or null if two color tinting is not used. The dark\n     * color's alpha is not used. */\n    darkColor: Color | null = null;\n\n    /** The name of the attachment that is visible for this slot in the setup pose, or null if no attachment is visible. */\n    attachmentName: string | null = null;\n\n    /** The blend mode for drawing the slot's attachment. */\n    blendMode: BLEND_MODES = BLEND_MODES.NORMAL;\n\n    constructor(index: number, name: string, boneData: BoneData) {\n        if (index < 0) throw new Error('index must be >= 0.');\n        if (!name) throw new Error('name cannot be null.');\n        if (!boneData) throw new Error('boneData cannot be null.');\n        this.index = index;\n        this.name = name;\n        this.boneData = boneData;\n    }\n}\n"],"names":[],"mappings":";;;AASO,MAAM,QAA8B,CAAA;AAAA,EAwBvC,WAAA,CAAY,KAAe,EAAA,IAAA,EAAc,QAAoB,EAAA;AAtB7D;AAAA,IAAQ,IAAA,CAAA,KAAA,GAAA,CAAA,CAAA;AAUR;AAAA;AAAA,IAAA,IAAA,CAAA,KAAA,GAAQ,IAAI,KAAA,CAAM,CAAG,EAAA,CAAA,EAAG,GAAG,CAAC,CAAA,CAAA;AAI5B;AAAA;AAAA,IAA0B,IAAA,CAAA,SAAA,GAAA,IAAA,CAAA;AAG1B;AAAA,IAAgC,IAAA,CAAA,cAAA,GAAA,IAAA,CAAA;AAGhC;AAAA,IAAA,IAAA,CAAA,SAAA,GAAyB,WAAY,CAAA,MAAA,CAAA;AAGjC,IAAA,IAAI,KAAQ,GAAA,CAAA;AAAG,MAAM,MAAA,IAAI,MAAM,qBAAqB,CAAA,CAAA;AACpD,IAAA,IAAI,CAAC,IAAA;AAAM,MAAM,MAAA,IAAI,MAAM,sBAAsB,CAAA,CAAA;AACjD,IAAA,IAAI,CAAC,QAAA;AAAU,MAAM,MAAA,IAAI,MAAM,0BAA0B,CAAA,CAAA;AACzD,IAAA,IAAA,CAAK,KAAQ,GAAA,KAAA,CAAA;AACb,IAAA,IAAA,CAAK,IAAO,GAAA,IAAA,CAAA;AACZ,IAAA,IAAA,CAAK,QAAW,GAAA,QAAA,CAAA;AAAA,GACpB;AACJ;;;;"}