package stdout

import (
	"context"

	"github.com/antitbone/ja4/correlator/internal/domain"
)

// Config holds the stdout sink configuration.
type Config struct {
	Enabled bool
}

// StdoutSink is a no-op data sink. Operational logs are written to stderr
// by the observability.Logger; correlated data must never appear on stdout.
type StdoutSink struct{}

// NewStdoutSink creates a new stdout sink.
func NewStdoutSink(config Config) *StdoutSink {
	return &StdoutSink{}
}

// Name returns the sink name.
func (s *StdoutSink) Name() string {
	return "stdout"
}

// Reopen is a no-op for stdout.
func (s *StdoutSink) Reopen() error {
	return nil
}

// Write is a no-op: correlated data must never be written to stdout.
func (s *StdoutSink) Write(_ context.Context, _ domain.CorrelatedLog) error {
	return nil
}

// Flush is a no-op for stdout.
func (s *StdoutSink) Flush(_ context.Context) error {
	return nil
}

// Close is a no-op for stdout.
func (s *StdoutSink) Close() error {
	return nil
}
